Chapter 13. Working with Files and Directories

In this chapter, you learn the following:

How to include other files in your documents

How to test for the existence of files and directories

How to open a file before working with it

How to read data from files

How to write or append to a file

How to lock a file

How to work with directories

How to pipe data to and from external applications

How to send shell commands and display results in the browser

Testing for the existence of files, reading from them, and writing to them are important features of any rich programming language. PHP is no exception, in that it provides functions that make these processes straightforward. In addition, because PHP, Apache, and MySQL are not the ...

Get Sams Teach Yourself PHP, MySQL® and Apache All in One, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.