Re: uploading files
| From: | sarahana | Date: | Thu, 06 Jul 2000 10:53:01 +0000 |
| Subject: | Re: uploading files | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-5194@lists.php.net to get a copy of this message | ||
While using rename, is the complete path required or the URL will be enough?
>sarahana wrote:
>>
>> 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
>> >>
>> >
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
>> For additional commands, e-mail: php-general-help@lists.php.net
>> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>