利用
copy();//复制
bool copy ( string $source , string $dest )
将文件从 source 拷贝到 dest。成功时返回 TRUE, 或者在失败时返回 FALSE.
如; 假设当前上传的文件叫'1.jpg'
例子:
$file = '1.jgp';
$newfile = 'example.jpg;
if (!copy($file, $newfile)) {
echo "failed to copy $file...\n";
}?>
copy('welcome.txt','ss.txt'); welcome.txt是源文件名,ss.txt是目标文件名就是新文件名
我建义你去下个php手册,这是php手册里的函数。