Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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

Alternatives

  • Check that the file exists before trying to remove it.