Re: Uploaden files to the server
| From: | Richard Davey | Date: | Tue, 11 May 2004 10:27:35 +0000 |
| Subject: | Re: Uploaden files to the server | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-185889@lists.php.net to get a copy of this message | ||
Hello Lieve,
Tuesday, May 11, 2004, 11:24:09 AM, you wrote:
LV> I am trying the upload a file to the server where my website is.
LV> I get always the same fault when I want the try this code:
LV> "Warning: Unable to create 'test.jpg': Permission denied in
LV> "copy($_FILES['file']['tmp_name'],"imgs/" .
Your imgs/ directory does not have permissions to be able to handle
files that are uploaded via the browser and then moved into it. This
is a directory permissions (Unix?) setting and not something you can
over-ride in your PHP code. When files are uploaded from a browser
they are typically owned by "nobody" (as that is who Apache runs as).
So if "nobody" doesn't have write access to that folder, it won't be
able to copy your files into it so your script will fail.
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html