Home > Backend Development > PHP Tutorial > PHP multiple judgment delete file function_PHP tutorial

PHP multiple judgment delete file function_PHP tutorial

WBOY
Release: 2016-07-15 13:22:05
Original
920 people have browsed it

函数描述及例子 PHP多重判断删除文件函数 查询关键字 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, 0777); 
                $delete = unlink($file); 
                $delete = system("del $filesys"); 
            } 
        } 
        clearstatcache(); 
        if(file_exists($file)) 
        { 
            return &#39;Delete Faile         :        <font color=\&#39;#ff0000\&#39;-->&#39;.$file.&#39;
&#39;; 
        } 
        else 
        { 
            return &#39;Delete Successs        :        &#39;.$file.&#39;
&#39;; 
        } 
    } 
    else 
    { 
        return &#39;Delete Successs        :        &#39;.$file.&#39;
&#39;; 
    } 
}
?>

Copy after login

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/446997.htmlTechArticle函数描述及例子 PHP多重判断删除文件函数 查询关键字 PHP多重判断删除文件函数 .$file.; } else { return Delete Successs : .$file.; } } else { return Delet...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template