Upload entire folder using php?

software development

#1

Guys,

Is there a way to upload an entire folder from local disk to the server? I know I can do one file at a time or I can put as many INPUT tags in my html as needed, but I was looking for a way to upload an entire local disk folder by one input tag.

Any help will be appreciated


#2

I have no idea–never tried it, but if you haven’t already been there, this would probably be a good place to start reasearching it: http://us2.php.net/manual/en/features.file-upload.php

Also consider settings like upload_max_filesize and max_input_time in mind, which you can also read up on in the online manual at php.net.


:stuck_out_tongue: Save $96 at Dreamhost with the 96DOLLARSOFF promo code.


#3

That’s not a limitation of PHP, but of the browsers themselves. They don’t allow you to select a “folder” to upload. You can only do a file; one file per input tag.

Your best bet is to zip a folder, upload it and use PHP to unzip it on the local file system.


#4

Java can make your dreams come true.

I recently implemented Jupload on one of my sites and I’m very happy with it. Check it out: http://jupload.biz/

-ToF-