du229908 2010-12-15 21:30
浏览 35
已采纳

想要创建允许用户单击下载所有图像的Web应用程序功能。 需要一些指示

I am building a custom app for a client (a photographer for commercial real estate) using typical PHP / MySql setup. This app will allow my client's clients to access images assigned to them, view them and download them.

I need to add the option to allow his clients to click "download all - print size quality" and "download all - web resolution". When images are uploaded, they will automatically be saved in those separate resolutions. To give you an idea, adding up the images a client would typically want to download, would equal up to 500MB. I think having all the images compressed to a zip would be the way to go.

How do you suggest I approach this, and if you know any source that may help me?

  • 写回答

4条回答 默认 最新

  • dran0703 2010-12-15 21:48
    关注

    You can use PHP Zip

    example can be found here : http://www.php.net/manual/en/zip.examples.php

    OR

    If you prefer dirty solution, you can use the linux built-in tar function, and combine with exec


    I assume you should have 3 different dimensions for each image, and your zip is only focus on select the images with correct dimension to add into archive.

    However, the above is not an issue, you should convince your clients a better way to download these huge file, like consider using a ftp program, or some download tools instead of just via http hyperlink (chances of failure is way too high)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?