Re: Uploading Files

From: Date: Thu, 24 May 2001 16:56:36 +0000
Subject: Re: Uploading Files
Groups: php.db php.windows 
Request: Send a blank email to php-db+get-9616@lists.php.net to get a copy of this message
Hello John, This problem should be fixed im still waiting on a reply, but when you use the move_uploaded_file command, you have to give the filename you want it saved to as well, he had: move_uploaded_file($printFile, "c:\\printFiles"); when he changed it to: move_uploaded_file($printFile, "c:\\printFiles\\filename.ext"); it worked fine...the way the script is setup now is the tmp file name is exploded (so we dont have recuring filename.ext problems) then its saved as the tmp name...heres how the script is set now: <?php if(is_uploaded_file($printFile)) { $filename = explode("\\", $printFile); move_uploaded_file($printFile, "c:\\printfiles\\" . $filename[1]); Echo "copied"; } else { echo "Possible file attack"; } ?> Works fine on my system, waiting for his reply to see if it works for him as well ~Jeff In a message dated 5/24/2001 12:40:15 PM Eastern Daylight Time, JAsendorf@lcounty.com writes: > I had that same problem. It fixed itself when I changed directories and > recreated the directories. I'm not certain if it had to do with the > permissions on those folders or what, but that made all the difference. > Have you double checked your php.ini file for the upload directory? > > John >

« previous php.db (#9616) next »