Re: upload temp dir in vhost env.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, August 26, 2007 10:34 am, jekillen wrote:
> I have been working on a project that has registered users, each
> having
> a user space portion of the web site file system. I want them to be
> able to upload images and such and have the stuff transfered to their
> own user spaces. With one up load temp dir designated, how do I
> insure that the uploaded files get to the correct destination?

http://php.net/move_uploaded_file

And, BEFORE you move it, you should Validate the uploaded file as many
ways as practical for your web application.

> I am using Apache on unix based host and am aware that php
> assigns a temp name to files that are uploaded, but if different
> users are uploading files concurrently, there could be a confusion
> as to where each file should be transfered to.

The user uploading the file is probably logged in, and you probably
have some kind of user_id or Profile and can decide where to move the
file based on that user's identity.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux