<?php
$file="lock.txt";
$newfile="../1.txt";
if(!copy($file,$newfile))
{
echo?"file?copy?false";
}
else
echo?"file?copy?true";
??>雖然運(yùn)行成功但不知怎么回事沒有復(fù)制文件。<?php
$file="lock.txt";
$newfile="../1.txt.bak";
if(!copy($file,$newfile))
{
echo?"file?copy?false";
}
else
echo?"file?copy?true";
??>為什么要加.bak最后就是為什么是txt復(fù)制到txt?還有不能復(fù)制到目錄嗎?
php的copy函數(shù)?
錯(cuò)過了年華
2016-11-29 22:45:52