note 25204 rejected from features.file-upload by jmcastagnetto

From: Date: Sat, 14 Sep 2002 00:29:08 +0000
Subject: note 25204 rejected from features.file-upload by jmcastagnetto
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-36661@lists.php.net to get a copy of this message
I used this script : <?php // Complete working file upload example, Win2KPro, Apache 1.3x, PHP 4.x // Set this line in php.ini // upload_tmp_dir = /Library/WebServer/yourURL.com/upload_directory/ function handleupload() { if (is_uploaded_file($_FILES['userfile']['tmp_name'])) { $realname = $_FILES['userfile']['name']; print "<b>$realname</b> was uploaded successfuly to the upload directory"; print ""; copy($_FILES['userfile']['tmp_name'], "/Library/WebServer/yourURL.com/upload_directory/".$realname); } else { echo "Possible file upload attack: filename ".$_FILES['userfile']['name']."."; } } ?> <html><body> <?php if ($act == "upload") { handleupload(); } ?> <form ENCTYPE="multipart/form-data" method="POST" action="ultest.php?act=upload"> File:<INPUT TYPE="FILE" NAME="userfile" SIZE="35"> <input type="hidden" name="MAX_FILE_SIZE" value="1000000"> <input type="submit" value="Upload" name="B1"> Please click only <b>once</b> and wait for confirmation </form> <a href=ultest.php>clear form</a> </body></html> to uplaod some files but it does'nt work because i cant define this :/Library/WebServer/yourURL.com/upload thanks for help

« previous php.notes (#36661) next »