O'Reilly logo

PHP Phrasebook: Essential Code and Commands by Christian Wenz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. Using Files on the Server File System

Although databases are very common, using the file system to store data can be a real alternative. Often, it is easier to implement that way. Sometimes, it is faster, and much more importantly, all hosting providers have file access enabled, whereas database support might only be available at extra cost.

PHP supports working with files through a set of certain functions. Using wrappers, the same technologies can also be used to access remote data via protocols like Hypertext Transfer Protocol (HTTP) or File Transfer Protocol (FTP), but this is covered in more detail in Chapter 9, “Communicating with Others.”

This chapter covers both standard tasks such as reading and writing files, and advanced tasks ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required