PHP » I/O » unlink()

Syntax:
bool unlink(string filename)
filename
The name of the file.

Deletes a file.

unlink() deletes a file. TRUE is returned on success. If an error occurs, FALSE is returned.

Examples

Code:
<?php

if (unlink("backup/logbackup.txt")) {
   print "File deleted!";
}

?>
Output:
File deleted!
Explanation:

A file is removed.

See Also: