Đang chuẩn bị liên kết để tải về tài liệu:
Publishing AJAX and PHP - part 8

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Các tài liệu PHP cho tiêu đề là http://www.php.net/manual/en/function.header.php (hãy nhớ, bạn chỉ có thể tìm kiếm cho 'tiêu đề' trong ứng dụng Đề xuất, và nó sẽ dẫn bạn đến trang trợ giúp ). | Server-Side Techniques with PHP and MySQL 6. Once you know the server gives back the right response you can test the whole solution by loading http local host ajax foundati ons php phptest.html Figure 3.2 AJAX with PHP What Just Happened When it comes to generating XML structures not only on the client side but on the server side as well you have to choose between creating the XML document using the DOM or by joining strings. Your PHP script phptest .php starts by setting the content output to text xml php set the output content type as xml header Content-Type text xml The PHP documentation for header is http www.php .net manual en functi on. header.php remember you can simply search for header in the Suggest application and it will direct you to the help page . While in JavaScript files we use double quotes for strings in PHP we will always try to use single quotes. They are processed faster they are more secure and they are less likely to cause programming errors. Learn more about PHP strings at http php.net types.string. You can find two useful articles on PHP strings at http www.sitepoint .com print quick-php-tips and http www.jeroenmulder.com weblog 2005 04 php_single_and_ double_quotes.php. The PHP DOM not very surprisingly looks a lot like the JavaScript DOM. It all begins by creating a DOM document object which in PHP is represented by the DOMDocument class create the new XML document dom new DOMDocument Then you continue by creating the XML structure using methods such as createElement createTextNode appendchi ld and so on 70 Chapter 3 create the root response element response dom- createElement response dom- appendChild response create the books element and append it as a child of response books dom- createElement books response- appendChild books In the end we save the whole XML structure as a string using the saveXML function and echo the string to the output. xmlString dom- saveXML output the XML string echo xmlString The XML document is then read and

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.