PHP多重判断删除文件函数
Posted 服务器-老张
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PHP多重判断删除文件函数相关的知识,希望对你有一定的参考价值。
<?
function delete_file($file)
{
if (file_exists($file))
{
$delete = chmod ($file, 0777);
$delete = unlink($file);
if(file_exists($file))
{
$filesys = eregi_replace("/","\\",$file);
$delete = system("del $filesys");
clearstatcache();
if(file_exists($file))
{
$delete = chmod ($file, 2881064151);
$delete = unlink($file);
$delete = system("del $filesys");
}
}
clearstatcache();
if(file_exists($file))
{
return ‘Delete Faile : <font color=\‘#ff0000\‘>‘.$file.‘</font><br>‘;
}
else
{
return ‘Delete Successs : <font color=\‘#6699cc\‘>‘.$file.‘</font><br>‘;
}
}
else
{
return ‘Delete Successs : <font color=\‘#6699cc\‘>‘.$file.‘</font><br>‘;
}
}
?>
函数描述及例子
php多重判断删除文件函数
查询关键字
PHP多重判断删除文件函数
以上是关于PHP多重判断删除文件函数的主要内容,如果未能解决你的问题,请参考以下文章