File Upload stuck in the midst

From: Date: Tue, 13 Feb 2001 08:40:34 +0000
Subject: File Upload stuck in the midst
Groups: php.general 
Request: Send a blank email to php-general+get-39376@lists.php.net to get a copy of this message
Hi! I am facing some problems while uploading files.. I just copied the code from php.net from the section "Handling File Uploads". My index.php pages has the following code: <html> <head> <title>File Uploads</title> </head> <body> <FORM ENCTYPE="multipart/form-data" ACTION="action.php" METHOD=POST> <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="2000"> Send this file: <INPUT NAME="userfile" TYPE="file"> <INPUT TYPE="submit" VALUE="Send File"> </FORM> </body> </html> ACtion.php has the following code: <?php if (is_uploaded_file($userfile)) { copy($userfile, "(c:\\)"); } else { echo "Possible file upload attack: filename '$userfile'."; } /* ...or... */ move_uploaded_file($userfile, "(c:\\)"); ?> I always get the error: message.. [Possible file upload attack: filename 'none'.] Can anybody tell me what could be the possible reason for this. Thanx a lot! Dhaval Desai __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/

« previous php.general (#39376) next »