Chapter 7. WORKING WITH FILES

WORKING WITH FILES

File manipulation is an important part of PHP programming. To accomplish your task, you may need to create text files on the fly, read tab-delimited files to import huge chunks of data, or perhaps even create cache files for speeding up your server and reducing processor overhead.

File Permissions

In order to do any useful file operations, PHP needs permission to access files. On most webservers, PHP can read files easily enough, but it does not have the necessary permissions to create and alter files. This is a good thing, because universal file write access usually gives hackers carte blanche to do whatever they like ...

Get Wicked Cool PHP 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.