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 such as archiving files in ZIP or BZ2 format. Many of these tasks can be solved in different, equally usable ways, so you truly have the freedom of choice.




PHP Phrasebook
PHP Phrasebook
ISBN: 0672328178
EAN: 2147483647
Year: 2005
Pages: 193

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net