dongna9185 2012-04-18 08:27
浏览 144

在php,windows中创建ZIP文件

I have to create a zip file using php. The files are located in a directory of my web server. I have to add these files ( dynamically ) and make a zip file.

Working perfect in php with small files but when I tried to make zip using files greater than 200 MB I will take more time to create zip.

So is there is any way to make a zip file using windows system command, which can run through PHP ? So that we can create zip files easily and quickly with out memory loss .

Please help

  • 写回答

1条回答 默认 最新

  • doushajian2018 2012-04-18 08:35
    关注

    You could try to implement a queue of some kind, perhaps in your database. You enqueue zip operations, while on the background a cron job of some kind does the zipping, and notifies your queue when it's finished.

    This won't decrease processing time, but since zipping is a CPU and I/O heavy operation, it probably can't be sped up much. Using this technique you don't have to let your user wait until zipping is done, you could for example simply send an e-mail (with the link to the created zip file) when it's done.

    评论

报告相同问题?

悬赏问题

  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用