Re: uploading files
| From: | CJD | Date: | Mon, 08 Oct 2001 00:17:50 +0000 |
| Subject: | Re: uploading files | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-9738@lists.php.net to get a copy of this message | ||
This is usually because PHP does not have write/create permission on the
server's web directory. Ask you host to alter it for you.
"Alexandre Busquets Trioal" <alex@triplevedoble.net> wrote in message
news:3BBDDEFC.3090302@triplevedoble.net...
> I´tring to do an upload images files script for my remote site. I have
> tried this into my local machine and run well, i know that run correctly
> because my local site(my machine) i don´t need user/pass to access. But
> my site need autentification pass/user, I put my script into my remote
> site and I have this error.
>
> Warning: Unable to create '/home/sites/site40/web/lignea/img/maria.jpg':
> Permission denied in /home/sites/site40/web/lignea1/imatge.php on line 24
> failed to copy ...
>
> the script is:
>
> <?php
>
> define("GIF", "1");
> define("JPG", "2");
> define("PNG", "3");
> define("SWF", "4");
>
> $size = GetImageSize($fitxer);
>
> $fitxer_name="maria";
>
> $fitxer2=dirname($fitxer)."/".$fitxer_name;
>
> print ($fitxer2."<br>");
>
> $fitxer2=strtolower(str_replace(" ","",$fitxer2));
>
> move_uploaded_file($fitxer,$fitxer2);
>
> $fitxer3=$DOCUMENT_ROOT."/lignea/img/".$fitxer_name;
>
> print $fitxer3;
>
> if (!copy($fitxer2, $fitxer3.'.jpg')) {
> print ("failed to copy $file...<br>\n");
> }
>
> unlink($fitxer2);
> ?>
>
> Thanks.
>