檔案系統函式庫

copy

(PHP3 , PHP4)

copy ---  複製檔案

語法 : int copy (string source, string dest)

說明 : 

複製檔案,成功則傳回true否則傳回false

Example :

<?php

   if (!copy($file, $file.'.bak')) { 

        print ("failed to copy $file...<br>\n"); 

  }

?>

參考 : rename( )


上一頁 首頁 下一頁