有没有一种方法可以使用php解压缩.Z文件? [英] Is there a way to uncompress .Z files using php?
本文介绍了有没有一种方法可以使用php解压缩.Z文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有一种方法可以使用php解压缩.Z文件?
Is there a way to uncompress .Z files using php?
推荐答案
现在的解压缩
只是单行调用带有适当选项的 gzip
。要使用 gzip
,您无需执行shell。您可以改用 Zlib扩展。我会尝试类似的东西:
Nowadays uncompress
is just nothing more than a one-liner invoking gzip
with proper options. To use gzip
, you don't have execute shell. You can use Zlib extension instead. I'd try something like:
<?php
$contents = zlib_decode(file_get_contents('/path/file.Z'));
这篇关于有没有一种方法可以使用php解压缩.Z文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文