Image moving and renaming on my server

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dave_c00
Forum Commoner
Posts: 37
Joined: Wed May 28, 2003 6:08 am

Image moving and renaming on my server

Post by dave_c00 »

Hello,

I have a folder on my server that contains loads and loads of images.

What I want to do is copy an image from this folder to another location and rename it at the same time all within a function....

....if I have 4 variables:

$name1 = "1.jpg";
$location1 = "/images1/";
$name2 = "2.jpg";
$location2 = "/images2/";

Is this possible.??

Thanks

Dave
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

there is no move function in PHP. What you need to do is read up on the rename() function
Post Reply