开发者

small error I cant find, please check this rename() function

开发者 https://www.devze.com 2022-12-12 06:10 出处:网络
Please have a quick look below, what is wrong here? $tmp_img_path=\"../temp_images/\"; $name_image1=\"mypicture.jpeg\";

Please have a quick look below, what is wrong here?

$tmp_img_path="../temp_images/";
$name_image1="mypicture.jpeg";
$new_img_path="../images/";
rename($temp_img_path.$name_image1, $new_img_path.'thumbs/');

I want to find the file with filename $name_image1 and place it in the new path, but in a folder called 'thu开发者_如何转开发mbs'.

I get warning rename function in my browser!

Thanks


you're renaming a file to a directory

rename($temp_img_path.$name_image1, $new_img_path.'thumbs/');

try

rename($temp_img_path.$name_image1, $new_img_path.'thumbs/'.$name_image1);
0

精彩评论

暂无评论...
验证码 换一张
取 消