ID: 10487 Updated by: rasmus Reported By: [EMAIL PROTECTED] Status: Closed Bug Type: HTTP related PHP Version: 4.0.4pl1 Assigned To: Comments: Fixed in CVS - will be in 4.0.5 Previous Comments: --------------------------------------------------------------------------- [2001-04-25 12:26:10] [EMAIL PROTECTED] This has been fixed in CVS and will be part of 4.0.5 See bug #9298 --------------------------------------------------------------------------- [2001-04-25 05:28:53] [EMAIL PROTECTED] <HTML> <BODY> <?php define(MAX_SIZE, 1000000); define(UPLOAD, 0); define(SUBMIT, 1); function upload() { global $PHP_SELF; printf ("<form method="post" ENCTYPE="multipart/form-data" action="%s?action=%d&person_id=%d">n", $PHP_SELF,SUBMIT,$person_id); print ("File:<BR> <INPUT TYPE=FILE NAME="pictfile" SIZE=50><BR>"); print ("<input type="submit" name="button">n"); printf ("</form>n"); } function submit($file) { $fd=fopen($file,"r") or die ("Unable to open uploaded file!"); $data=fread($fd, MAX_SIZE); fclose($fd); unlink($file); echo "Beginning of file: ".substr($data, 0, 25); } if (empty($action)) $action = UPLOAD; switch ($action) { case UPLOAD: upload(); break; case SUBMIT: submit($pictfile); break; default: die ("Unknown action code ($action)"); } ?> </body> </html> --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=10487&edit=2 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]