uploading file

From: Date: Mon, 05 Feb 2001 18:11:48 +0000
Subject: uploading file
Groups: php.general 
Request: Send a blank email to php-general+get-38285@lists.php.net to get a copy of this message
OK, I'm not sure if the file is getting uploaded or not, and it certainly is not getting copied to the permanent directory. Here's what I have: This creates the upload form: <FORM method="post" ENCTYPE="multipart/form-data" action="add_record2.php"> <INPUT type="file" name="picture" size=30> </form> This is the action from that form: // Creates the image file with a timestamp $timestamp = time(); $image= $timestamp.$picture_name; if ($PLATFORM == "windows") { $new_path = str_replace('^', '\\', $WINDOWS_PATH); echo $picture; if (is_uploaded_file($picture)) { copy($picture, $new_path); //move_uploaded_file($picture, $new_path); } else { echo "Possible file upload attack: filename '$picture'."; } }

« previous php.general (#38285) next »