unlink() 函数删除文件。

unlink() 函数删除文件。

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

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

 

posted @ 2019-11-18 10:28  大熊童鞋  阅读(411)  评论(0编辑  收藏  举报