tags:

views:

28

answers:

1

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 'thumbs'.

I get warning rename function in my browser!

Thanks

+1  A: 

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);
Brandon H