开发者

Generating files/folders?

This might be a horrifically stupid question, but how would I go about doing this in PHP:

I'd like to make a .zip file dynamically, then serve it as a download immediately with force-download mime or something, with the contents of $string, with a folder structure.

Premade folder structure license\keys\{$_SERVER['REMOTE_ADDR']}\{$fn}.cf and {$fn}.cf would contain the contents of $string, inside the .zip file

I have literally no idea where 开发者_JAVA百科to start.


You could use the ZipArchive class. Use it to create a temporary ZIP file, close the ZipArchive, stream the temporary ZIP file to the user, and delete the temporary ZIP.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜