Easiest multiple file upload with minimal "plugins"
I want to do a multiple file upload (you know, the kind that says "choose y开发者_如何学Pythonour image(s)" and actually lets you select more than one from the fileup dialogue),
What's the EASIEST way to do this (I know someone's going to say jQuery), using raw PHP as the backend?
The easiest way would be using HTML5 built in multiple file uploader
<input type="file" name="uploads[]" multiple="true"/>
But this currently works only with the newest Safari, Chrome and Firefox. For any other browsers you need to fall back to the good old Flash component like SWFUpload or any other.
I think you can't do this without browser-side plug-in (such as Flash - even javascript won't be enough, you need filesystem access) if you want it universally compatible.
I have used Uploadify before, and I can say it was very easy to use. Look at the last demo on that page.
It uses jQuery, and even comes with a small sample PHP script.
精彩评论