PHP delete()函数
delete() 函数会删除一个文件,并在成功时返回 true,在失败时返回 false。
语法
void delete ( string file )
delete()函数是一个虚拟的手动条目,以满足那些将unlink()或unset()错误放置的人。
示例
<?php
echo delete("/PhpProject/sample.txt");
echo "File has been deleted successfully";
?>
输出
File has been deleted successfully