Re: Unable to upload.. :(
| From: | Dash McElroy | Date: | Mon, 25 Nov 2002 01:36:31 +0000 |
| Subject: | Re: Unable to upload.. :( | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-17100@lists.php.net to get a copy of this message | ||
Toby,
Your ISP may be using 'safe_mode'. Try the move_uploaded_file function()
instead of copy(). This is taken off php.net/move_uploaded_file:
Note: move_uploaded_file() is not affected by the normal safe-mode
UID-restrictions. This is not unsafe because move_uploaded_file() only
operates on files uploaded via PHP.
Hope this helps...
-Dash
*** NEWSFLASH ***
Russian tanks steamrolling through New Jersey!!!! Details at eleven!
On Sun, 24 Nov 2002, [iso-8859-1] toby z wrote:
> Hi all
> I am trying to upload a file. It works fine on my local Apache, but
> gives me "Permission denied to create file" error on my online host..
> Any clue???
>
> $file = $_FILES['userfile']['tmp_name'];
> if (is_uploaded_file($file))
> print_r("Copying ".$file);
> if (copy($file, "./files/". $_FILES['userfile']['name']))
> echo("Success");
>
> else
> echo("Failure");
>
>
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>