On Monday, July 14, 2003, 11:04:48 PM, caspar wrote:
ck> If you want the file to go into a holding location until your administrator
ck> can approve it and move it to its real final location, then the holding
ck> location should be the target of the move_uploaded_file().  This makes it up
ck> to you to decide what you want the structure of your holding location to be,
ck> and how you want to keep track of any files currently populating it.

ck> - I'm a little confused. The files are already in there real location. It is
ck> just that someone may want to change that location at a later date.
ck> e.g. they upload an image to a folder and two months later decide it is
ck> better placed in a different folder.

ck> Or am I missing something really obvious.

Hrmm ... might be. Maybe you are making this more difficult than it
is? Once the file is uploaded, move it to _a_ location, doesn't have
to be its permanent location, just so its moved from the temp
directory.

Keep in mind that the directory that you move it to, PHP has to be
able to access it (have proper permissions). Specifically, Apache (or
your webserver), has to have proper permissions for the directory.

In your application code ... you can implement a move() function that
can either call the unix (mv) or windows (move) commands to move the
file to another location (same permission restrictions apply). The
thing about move is, its a copy + delete function in one, so you have
to be careful about permissions. You might have permissions to copy,
but not delete.

Hoping this helps,
-- 
Regards,
Burhan Khalid
phplist[at]meidomus[dot]com
http://www.meidomus.com


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

Reply via email to