Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
200 views
in Technique[技术] by (71.8m points)

php - Download Multiple files in one HTTP request

how is it possible to download multiple files in one HTTP request? what i mean it's like when you have multiple attachments and you select what you want to download then press download so they will be automaticcaly downloaded and you don't have to click on each one manually.

i'm using PHP as a serverside srcipting.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

It is possible to send a multipart response in HTTP:

In general, HTTP treats a multipart message-body no differently than any other media type: strictly as payload. […] an HTTP user agent SHOULD follow the same or similar behavior as a MIME user agent would upon receipt of a multipart type.

[…] If an application receives an unrecognized multipart subtype, the application MUST treat it as being equivalent to "multipart/mixed".

But since Firefox is the only browser that I know about to support such multipart responses (apart from multipart/byterange), you should use some archive file format for this purpose.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...