PHP unlink() 函数

 

unlink() 函数删除文件。

如果成功,该函数返回 TRUE。如果失败,则返回 FALSE。

<?php
$file = "test.txt";
if (!unlink($file))
{
echo ("Error deleting $file");
}
else
{
echo ("Deleted $file");
}
?>

 

参考:

https://www.runoob.com/php/func-filesystem-unlink.html

 

posted @ 2019-08-01 00:17  anobscureretreat  阅读(403)  评论(0编辑  收藏  举报