unlink() 函数删除文件。

unlink() 函数删除文件。

若成功,则返回 true,失败则返回 false。

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

猜你喜欢

转载自www.cnblogs.com/xiong-hua/p/11880615.html