unlink()
Posted: Fri May 04, 2007 12:39 pm
I have a script which compares two files against each other. Once the comparison has been made, i want to delete the files from the server.
This does not work. It deletes the first and not the second:
This, however, does work:
Can anyone see why the if statement didn't work?
Wayne
This does not work. It deletes the first and not the second:
Code: Select all
if ((!unlink($file1)) && (!unlink($file2))){
echo 'files could not be deleted';
}Code: Select all
unlink($file1);
unlink($file2);
if ((file_exists($file1)) || (file_exists($file2))){
echo 'Files could not be deleted from server.';
}Wayne