...

View Full Version : Moving a file from one directory to another



ole90
05-01-2008, 07:15 PM
Hey guys,

I want to be able to move one file from a directory to another. I allow a user to upload an image and it gets stored in:

images/art_uploaded_temp/

and then i allow an admin to sift through all the uploaded files. Once they click accept, i want to move the uploaded file to another directory called

images/art_uploaded/

When i say i allow the admin to sift through all uploaded files, i mean that i use a database to store the url of the image once it's first uploaded. E.g.

A user uploads file sea.gif and the url to that file: http://www.fish.com/sea.gif is stored as a value in the database.

So what i need to know, is how do i get the file from the first directory, and then copy it over to the other directory.

Arragon
05-01-2008, 08:00 PM
This:
http://www.php.net/manual/en/function.copy.php

Or this:
http://www.php.net/manual/en/function.rename.php

Is probably what you need.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum