Article: PHP & Files

by Oland Whitecotton

PHP has built in functions which allow it to open, copy, rename, edit and delete files residing on the web server. This enables files to be cached to decrease database queries and increase server performance. Files can be edited very easily with PHP, useful for people on the go without FTP information to their site or an FTP application to access their website and something desperately needs changed.

Every PHP application opens files and uses the information stored within them to make the script run. A well designed site that lets the admin edit their files from the admin area will copy the file and back it up before any changes are made, to insure restoration of the "working" file is possible. PHP also has built in functions to CHMOD on Linux/Unix Operating Systems.