<ol class="dp-xml"><li class="alt"> <span class="tag"><</span> ?PHP </li><li><span>$</span><span class="attribute">file</span><span> = </span><span class="attribute-value">'yang.txt'</span><span>; </span></li><li class="alt"><span>$</span><span class="attribute">newfile</span><span> = </span><span class="attribute-value">'ji.txt'</span><span>; # <br />这个文件父文件夹必须能写 </span></li><li><span>if (file_exists($file) == false) { </span></li><li class="alt"><span>die ('小样没上线,无法复制'); </span></li><li><span>} </span></li><li class="alt"><span>$</span><span class="attribute">result</span><span> = </span><span class="attribute-value">copy</span><span>($file, $newfile); </span></li><li><span>if ($</span><span class="attribute">result</span><span> == false) { </span></li><li class="alt"><span>echo '复制记忆ok'; </span></li><li><span>} </span></li><li class="alt"><span class="tag">?></span><span> </span> </li></ol>
上記は、PHP でコピーされたファイルを削除するための関連テクニックの概要です。
http://www.bkjia.com/PHPjc/445970.html
true