Page 1 of 1

how to move images from one folder to another using php

Posted: Thu Oct 07, 2010 2:14 pm
by adsegzy
How do i move or copy a file that is already in one of my website online folders to another.

Re: how to move images from one folder to another using php

Posted: Thu Oct 07, 2010 2:16 pm
by Jonah Bron
To move or copy files, you want either rename() or copy(), respectively.

http://php.net/rename
http://php.net/copy

I know it sounds funny, but yes, you move files with the rename() function.

Re: how to move images from one folder to another using php

Posted: Fri Oct 08, 2010 11:24 am
by twinedev
And at a linux shell prompt, to rename a file, you use the mv (move) command.... LOL