<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_45111"> <div class="blockcode"> <div id="code_XfQ"><ol> <li> <li><?<li>/**<li>* func: delete_file<li>* params: $file 文件名称<li>* 多重条件判断 删除文件<li>* by bbs.it-home.org<li>*/<li>function delete_file($file) <li>{ <li> if (file_exists($file)) <li> { <li> $delete = chmod ($file, 0777); <li> $delete = unlink($file); <li> if(file_exists($file)) <li> { <li> $filesys = eregi_replace("/","\",$file); <li> $delete = system("del $filesys"); <li> clearstatcache(); <li> if(file_exists($file)) <li> { <li> $delete = chmod ($file, 0777); <li> $delete = unlink($file); <li> $delete = system("del $filesys"); <li> } <li> } <li> clearstatcache(); <li> if(file_exists($file)) <li> { <li> return 'Delete Faile : <font color='#ff0000'>'.$file.'</font><br>'; </li> <li> } </li> <li> else </li> <li> { </li> <li> return 'Delete Successs : <font color='#6699cc'>'.$file.'</font><br>'; </li> <li> } </li> <li> } </li> <li> else </li> <li> { </li> <li> return 'Delete Successs : <font color='#6699cc'>'.$file.'</font><br>'; </li> <li> } </li> <li>}</li> <li>?></li> </ol></div> <em onclick="copycode($('code_XfQ'));">复制代码</em> </div> </td></tr></table> <div id="comment_45111" class="cm"> </div> <div id="post_rate_div_45111"></div> <br><br>