标签:
copy函数可以复制文件,函数样式:
bool copy(string $source,string $dest)将文件从source拷贝到dest。
比如将c盘的example.txt复制到d盘example.txt.bak
实例如下:
/*第一种写入文件方式*/
$file = "c:\\example.txt";
$fileNew = "d:\\example.txt.bak";
if(copy($file,$fileNew)){
echo ‘复制成功!‘;
}else{
echo ‘复制失败!‘;
}
标签:
原文地址:http://www.cnblogs.com/usa007lhy/p/5731190.html