Re: can't upload files
| From: | Jason Wong | Date: | Wed, 15 May 2002 11:43:06 +0000 |
| Subject: | Re: can't upload files | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-97696@lists.php.net to get a copy of this message | ||
On Wednesday 15 May 2002 18:33, Diana Castillo wrote:
> I am using this script: to upload a picture file and I get the error below:
> "Unable to create 'hgh6.gif': Permission denied in
> /home/vhtdocs/archipro/do_upload.php on line 13
> Couldn't copy the file!" - What am I doing wrong
> <form enctype="multipart/form-data" method="post"
> action="do_upload.php">
>
> <p><strong>File to Upload:</strong><br>
> <input type="file" name="img1" size="30"></p>
>
> <P><input type="submit" name="submit" value="Upload
> File"></p>
>
> </form>
> upload file:
> <?
>
> // if $img_name isn't empty, try to copy the file
> if ($img1_name != "") {
>
> copy("$img1", "/images/$img1_name")
You're trying to copy something into the directory "/images". Does the
webserver have permissions to do so?
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Don't believe everything you hear or anything you say.
*/