Re: uploading files

From: Date: Thu, 06 Jul 2000 06:48:08 +0000
Subject: Re: uploading files
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-5174@lists.php.net to get a copy of this message
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

« previous php.general (#5174) next »