Forum Moderators: coopster

Message Too Old, No Replies

any way to upload a whole directory or multiple files w/ PHP?

         

partha

5:12 am on Feb 26, 2005 (gmt 0)

10+ Year Member



is there any way I can select more than one file at a time, or a whole directory of files on my local system to upload to a remote server?

jatar_k

5:37 am on Feb 26, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I have one lying around for multiple images

it checks how many are allowed and just adds a field for each until the max is reached.

The upload script them just looks to see if anything was entered into each box to figure out what to upload.

dreamcatcher

8:52 am on Feb 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Can`t you use FTP?

dcrombie

3:02 pm on Feb 26, 2005 (gmt 0)



How about the PHP Zip Functions [php.net]?

;)

partha

5:48 pm on Feb 26, 2005 (gmt 0)

10+ Year Member



well I was thinking of something where in the "file selector dialog" you can select multiple files at once using CTRL or SHIFT.

OR something where you can just select a directory instead of a file in the dialog.

I have a feeling that might require java, which is ok, but of course it would be nicer to do it without java.

ergophobe

6:20 pm on Feb 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Not even Javascript has access to the file structure on the client side (and obviously PHP doesn't) so I think you're stuck with Java or HTML. Since HTML doesn't allow multi-select, it's either Jatar_K's solution or some client-side applet.

Tapolyai

6:24 pm on Feb 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The problem is not that much the server side, but client side. Remember that file uploads is a "recent" development in relations to browsers.