note 55377 added to features.file-upload

From: Date: Mon, 01 Aug 2005 20:19:32 +0000
Subject: note 55377 added to features.file-upload
Groups: php.notes 
Request: Send a blank email to php-notes+get-92888@lists.php.net to get a copy of this message
Are you struggling to implement these code samples for "file upload" or "multiple file upload"? Are you still scratching your head why they don't work?? I tried everything, until I realized that my version of PHP was too old! Look at these tidbits (collected from pages at PHP.NET for your enjoyment): Requires PHP v4.1 - The $_FILES array Requires PHP v4.2 - The "error" sub-array - example: $_FILES["userfile"]["error"] Requires PHP v4.3 - The constants for "error" sub-array - example: UPLOAD_ERR_OK (value 0) So, if you have PHP v4.0.X or earlier, use the $HTTP_POST_FILES variable and just do without the error sub-array and it’s constants. It still works good! If you found this article useful, send praise via email. If this was a life-saver, send chocolate. ---- Manual Page -- http://www.php.net/manual/en/features.file-upload.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+55377 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55377&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55377&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55377&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55377&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55377&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55377&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+55377&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#92888) next »