note 55377 deleted from features.file-upload by felipe

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
Note Submitter: dan at DLC2 dot com 

----

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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.