While files are all very well and good in their own respect, there are a number of very serious drawbacks to using them that are easily eliminated by switching to databases. By happy co-incidence that is our next topic, so sit back and prepare to see why you should care about databases.
Next chapter: Databases >>
Files Reading files readfile() file_get_contents() and file() fopen() and fread() Creating and changing files file_put_contents() fwrite() Moving, copying, and deleting files Moving files with rename() Copying files with copy() Deleting files with unlink() Temporary files Other file functions Checking whether a file exists Retrieving a file's status Dissecting filename information A working example: making a counter Handling file uploads Advanced file upload handling Checking uploaded files Locking files with flock() Permissions Setting permissions Changing file ownership Working with directories Deleting directories One last directory function Remote files File checksums Parsing a configuration file Summary Exercises Further reading Next chapter
Table of Contents
Copyright ©2015 Paul Hudson.
Follow me: @twostraws.