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

原文地址:https://www.cnblogs.com/sea-stream/p/11280012.html