国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

php不使用copy()函數(shù)復(fù)制文件的方法

Original 2017-02-07 11:25:49 374
abstract:本文實(shí)例講述了php不使用copy()函數(shù)復(fù)制文件的方法。分享給大家供大家參考。具體如下:下面的代碼不使用php內(nèi)置的copy函數(shù),直接通過文件讀取寫入的操作方式復(fù)制文件<?php function copyfiles($file1,$file2){  $contentx =@file_get_contents($file1);   $ope

本文實(shí)例講述了php不使用copy()函數(shù)復(fù)制文件的方法。分享給大家供大家參考。具體如下:

下面的代碼不使用php內(nèi)置的copy函數(shù),直接通過文件讀取寫入的操作方式復(fù)制文件

<?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;
  }
?>

更多關(guān)于php不使用copy()函數(shù)復(fù)制文件的方法請關(guān)注PHP中文網(wǎng)(www.miracleart.cn)其他文章!

Release Notes

Popular Entries