douchuanchai2793 2012-12-14 00:13
浏览 33
已采纳

如何在Windows上以纯PHP的形式提取.tar文件?

I have a PHP script that I want to run on Windows. I need to extract a .tar file. How do I extract the tar file. I know of the PharData class and that works on Linux but not on Windows. My script just dies, no error output or anything. This same block of code runs on Linux. I'm using PHP 5.4.0 on Windows

$phar_data = new PharData($out_filepath);
$phar_data->extractTo($destination_folder);

Is there an alternative pure PHP way to extract a .tar file?

edit: I should say my real intent is to extract a .tar.gz file, but gzopen does the .gz part. Now I need to take care of the .tar part

  • 写回答

1条回答 默认 最新

  • dongxie5698 2012-12-14 00:31
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序