Extract CAB files with PHP

﹥>﹥吖頭↗ 提交于 2019-12-20 03:13:25

问题


Running PHP on IIS6, how can I open and extract the contents of a CAB-file? Is there any way of doing this witout using exec? I don't have permission to run stuff with exec.


回答1:


Without external tools like cabextract this won't work. PHP has no functions for this.




回答2:


This is unfortunately too long as a comment. I wrote a PHP based cab-archive reader a long time ago. Seeing how there is still interest, I put the sources online with the caveat that the project is not pretty, rather limited (no extraction of compressed/stored files) and was not written by a proficient programmer. It may only serve as a starting point.

  • Github: php-cab-reader



回答3:


I've written a library for extraction of CAB archives: https://github.com/wapmorgan/CabArchive

  • Extraction of uncompressed files is supported on all versions.
  • Extraction of compressed archives with MSZip compression works only on latest PHP versions (7.0.22+, 7.1.8+, 7.2.0).
  • Extraction of compressed archives with LZX compression is not supported.


来源:https://stackoverflow.com/questions/1560216/extract-cab-files-with-php

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!