php 复制文件之copy 和 file_get_content file_put_content 相差不大 但是后者需要格外内存资源

copy 可以省内存 

$a = new PerformanceTest();
$a->begin();
@copy('PerformanceTest.php','tmp.php');
$a->end();
$a->begin();
$b = file_get_contents('PerformanceTest.php');
file_put_contents('tmp.php',$b);
$a->end();

 

posted on 2017-04-27 15:18  小乔流水人家  阅读(545)  评论(0)    收藏  举报

导航