> -----Original Message-----
> From: caspar kennerdale [mailto:[EMAIL PROTECTED]
> Sent: 14 July 2003 18:49
> 
> I was hoping someone might clarify what may seem like a basic 
> point. I looked in the archives but didnt seem to get my answer.
> 
> I am creating a basic set of functions that will form the 
> back bone of an image gallery and a directory handler.
> 
> I am trying to crate the function that will allow the 
> administrator to Move a selected file to a different folder.
> I have looked at   move_uploaded_file () and it seems that 
> the source file to move needs to actually be the file's temp name.
> If the file has recently been uploaded then the temp name is 
> accessible via $_Files[] array,  but if the file was uploaded say a
> week before I assume that the temp name is no longer there.

Not only is the temp name no longer there, nor is the file!  When you upload
a file, the temporary place where PHP puts it is only valid for the life of
the script which processes the file upload -- it is automatically deleted
upon completion of that script.  If you want to keep it for possible later
processing, you must move_uploaded_file() it to your own private location,
and then it becomes your responsibility to keep track of its name and
location.

If you want the file to go into a holding location until your administrator
can approve it and move it to its real final location, then the holding
location should be the target of the move_uploaded_file().  This makes it up
to you to decide what you want the structure of your holding location to be,
and how you want to keep track of any files currently populating it.

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to