龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > web编程 > php编程 >

文件复制 php中不使用copy()函数复制文件的代码

时间:2014-08-15 15:32来源:网络整理 作者:网络 点击:
分享到:
php中不使用copy()函数复制文件的代码 [代码片段(14行)]
<?php 
    function copyfiles($file1,$file2){ 
          $contentx =@file_get_contents($file1); 
                   $openedfile = fopen($file2, "w"); 
                   fwrite($openedfile, $contentx); 
                   fclose($openedfile); 
                    if ($contentx === FALSE) { 
                    $status=false; 
                    }else $status=true; 

                    return $status; 
    } 
?>

精彩图集

赞助商链接