Re: uploading files
| From: | sarahana | Date: | Thu, 06 Jul 2000 08:41:35 +0000 |
| Subject: | Re: uploading files | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-5181@lists.php.net to get a copy of this message | ||
Well, this time, the script didn't get stuck halfway (I ran the same script
again), but the message is Permission denied "... How can that be?
>
>-----Original Message-----
>From: David Robley <huntsman@www.nisu.flinders.edu.au>
>To: sarahana@scournepal.com <sarahana@scournepal.com>
>Cc: php-general@lists.php.net <php-general@lists.php.net>
>Date: Wednesday, July 05, 2000 11:48 PM
>Subject: Re: [PHP] uploading files
>
>
>>On 5 Jul, sarahana wrote:
>>> This script hangs in the middle... Am I doing anything wrong?
>>>
>>> copy($userfile, $userfile_name);
>>> $nt = explode(".", $userfile_name);
>>> $fn = $fn.".".$nt[1];
>>> rename($userfile_name, $fn); # I'm renaming the file to
>somecode.extension
>>> (jpg or gif)
>>>
>>> $dir = \"\home\iris\scournepal-www\img\pro\\".\"$dir\\".$fn;
>>
>>This ^^ line might confuse things somewhat ^^ Try removing the wayward
>>backslashes and turn the ones you do need into slashes.
>>
>>>
>>> copy($fn, $dir);
>>>
>>> unlink($fn);
>>>
>>> header("Location: $HTTP_REFERER");
>>>
>>> Thanks,
>>> sarahana
>>>
>>>
>>
>>--
>>David Robley | WEBMASTER & Mail List Admin
>>RESEARCH CENTRE FOR INJURY STUDIES |
>>http://www.nisu.flinders.edu.au/
>>AusEinet |
>>http://auseinet.flinders.edu.au/
>> Flinders University, ADELAIDE, SOUTH AUSTRALIA
>>
>