Working with files
There are a number of functions in PHP for working with files.
- fopen(), low-level access to files on disk
- file_get_contents(), retrieve the contents of a file or URL
- file_put_contents(), saving a string to a local file.
Disk functions
unlink($path), delete filecopy($from, $to), copy a file from one location to another (can be from a URL to the local disk)rename(), rename or move a file on diskchmod(), change permissions to read, write or execute a file