Chapter 18. Interacting with the File System and the Server

In Chapter 2, “Storing and Retrieving Data,” you saw how to read data from and write data to files on the web server. This chapter covers other PHP functions that enable you to interact with the file system on the web server.

Key topics covered in this chapter include

  • Uploading files with PHP

  • Using directory functions

  • Interacting with files on the server

  • Executing programs on the server

  • Using server environment variables

To discuss the uses of these functions, we look at an example. Consider a situation in which you would like your client to be able to update some of a website's content—for instance, the current news about his company. (Or maybe you want a friendlier interface than FTP or SCP ...

Get PHP and MySQL Web Development, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.