M (→Error Checking)
In short, when writing code to work with files, always assume the worst. Assume the file doesn't exist and you don't have permission to read/write to it. In most cases this means you have to tell the user that, in order for the script to work, he/she needs to adjust those file permissions so that PHP can create files and read/write to them but it also means that your script can adjust and perform an alternative operation.
There are two main ways of error checking. The first is by using the '[http://uk.php.net/manual/en/language.operators.errorcontrol.php @]' operator to suppress any errors when working with the file and then checking if the result is