Re: [NEWBIE] Trying to create a function from an existing script

From: Date: Fri, 28 Jan 2005 06:18:00 +0000
Subject: Re: [NEWBIE] Trying to create a function from an existing script
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-207552@lists.php.net to get a copy of this message
Jon, Thanks for responding. Unfortunately, it still doesn't work. I tried it exactly as you wrote, and it still gives me the message that it failed to upload. Also, I actually want to force a name change to the file, so that regardless of what the name of the file uploaded is, it gets changed to "imagefile.jpg". I did try it exactly as you suggested, and it didn't work so I think there is something else I'm doing wrong. But I thought I should mention now that I want to impose my own name on the file, to save confusion later. Here is the whole if() statement: if(move_uploaded_file($_HTTP_POST_FILES['upfile']['tmp_name'],rawurlencode($store_dir. "imagefile.jpg"))) { echo("Uploaded ".$HTTP_POST_FILES['upfile']['name']." successfully."); } // If the copy function fails output a message. else { echo("Upload of ".$HTTP_POST_FILES['upfile']['name']." to ".$store_dir." failed."); } -- Dave Gutteridge dave@tokyocomedy.com

« previous php.general (#207552) next »