Monday, 15 February 2010

file upload - PHP: Copying and moving image -


In the form of a title, how do I copy an image which is the directory:

  Img / user.png  

And let's suppose we have this image of

  user_files / username / putfilehere.png  

I have found some very long route for this, but I believe it can be obtained from some lines of code.

Assume that our script is located in the directory / www / and you / www / img / user Want to copy the image from png to /www/user_files/username/putfilehere.png It is very easy to do this:

  Copy ('. / Img / user.png', './user_files/username/putfilehere.png');  

No comments:

Post a Comment