TAILIEUCHUNG - Sams Teach Yourself PHP, MySQL and Apache in 24 Hours phần 5

nhóm và tổng kết, biểu đồ, và công thức chẳng hạn như tính toán cơ bản và tổng số chạy. Phần lớn vật liệu này cũng Chúng tôi đã kết thúc với Violet Elizabeth Bott, không có nhiều cải thiện. Chúng ta có thể đối phó với vấn đề này bằng cách làm cho các chuỗi chữ thường trình với strtolower () trước khi gọi ucwords () | When the loop reaches the file named 0 the string returned by readdir resolves to false which causes the loop to end. The approach in Listing uses to check that the return value returned by readdir is not exactly equivalent to false. 0 only resolves to false in the test so we circumvent the problem. If you find the ordering of items in a directory listing to be arbitrary it s because the order is determined by the file system. If you want the items ordered in a specific fashion you must read the contents into an array which can then be sorted to your liking and subsequently displayed. Team LiB 1 PREVIOUS NEXT Team LiB 1 PREVIOUS NEXT Summary In this hour you learned how to use include to incorporate files into your documents and to execute any PHP code contained in include files. You learned how to use some of PHP s file test functions. You explored functions for reading files by the line by the character and in arbitrary chunks. You learned how to write to files either replacing or appending to existing content. Finally you learned how to create remove and read directories. Now that we can work with files we can save and access substantial amounts of data. If we need to look up data from large files however our scripts begin to slow down quite considerably. What we need is some kind of database. Team LiB 1 PREVIOUS NEXT Team LiB 1 PREVIOUS NEXT Q A Q1 Does the include statement slow down my scripts A1 Because an included file must be opened and parsed by the engine it adds some overhead. However the benefits of reusable code libraries often outweigh the relatively low performance overhead. Q2 Should I always end script execution if a file cannot be opened for writing or reading A2 You should always allow for this possibility. If your script absolutely depends on the file you want to work with you might want to use the die function writing an informative error message to the browser. In less critical situations you still need to allow for the failure perhaps

TỪ KHÓA LIÊN QUAN
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.