Re: php upload files
| From: | Richard Lynch | Date: | Thu, 24 May 2007 23:08:59 +0000 |
| Subject: | Re: php upload files | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-255595@lists.php.net to get a copy of this message | ||
On Wed, May 23, 2007 6:07 am, kats Ant wrote:
> Hi all a i am running a windows 2003 server with IIS. I have created a
> php script that uploads a file to a server.
>
> in the server i have users and a user1 has permission to folder1,
> user2 has permissions to folder2. I want an administrator to run the
> script and upload a file to these foldes. how can the script access
> the folders that only various users have access?
Assuming 'administrator' is more or less like 'root', you could use
http://php.net/move_uploaded_file in the upload
script to dump the
files into some staging directory, and record the meta-data about
which file belongs to whom and goes where in, say, a database.
You could then have a cron job ^H^H^H^H^H^H^H^H Scheduled Task run by
'administrator' to check the DB and shuffle files around and change
their permissions as needed.
--
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?