我想从此代码重命名picture
文件名(不带扩展名) 。old.jpg
我picture
在父目录中有文件并且路径正确
$old="picture";
$new="old.jpg";
rename($old , $new);
或此代码
$old="\picture";
$new="\old.jpg";
rename($old , $new);
$old="../picture";
$new="../old.jpg";
rename($old , $new);
$old="../picture";
$new="old.jpg";
rename($old , $new);
$old="./picture";
$new="./old.jpg";
rename($old , $new);
rename("picture", "old.jpg");
但我得到这个错误:
Warning: rename(picture,old.jpg) [function.rename]: The system cannot find the file specified. (code: 2) in C:\xampp\htdocs\prj\change.php on line 21