No such file or directory¶
Description¶
PHP reports, as warning, a failure to remove a file that doesn’t exists. This is both an error, as the file could not be removed, but also a success, as the file is removed in the end.
Example¶
<?php
unlink(non-existing-file.txt);
?>
Literal Examples¶
unlink(oops): No such file or directory
Solutions¶
Check that the file exists before trying to remove it.