复制代码 代码如下:
$a=zip_open('other.zip');
while ($e=zip_read($a)){
$fz = zip_entry_filesize($e);
$fn = iconv('GBK','UTF-8',zip_entry_name($e));
if (!$fz){//dir
mkdir($fn);
continue;
}
if (!zip_entry_open($a, $e))
continue;
file_put_contents($fn, zip_entry_read($e, $fz));
echo "$fz\t$fn\n";
zip_entry_close($e);
}
zip_close($a);
?>
$a=zip_open('other.zip');
while ($e=zip_read($a)){
$fz = zip_entry_filesize($e);
$fn = iconv('GBK','UTF-8',zip_entry_name($e));
if (!$fz){//dir
mkdir($fn);
continue;
}
if (!zip_entry_open($a, $e))
continue;
file_put_contents($fn, zip_entry_read($e, $fz));
echo "$fz\t$fn\n";
zip_entry_close($e);
}
zip_close($a);
?>
关键字词:
相关文章
- php网站被打解决方式 非ddos就是单纯消耗流量
- php下json_encode使用gbk输出时候null无输出内容解决办法
- php PHPMailer使用gmail发送邮件详细解决方法过程
- PHP、C# RSA加密交互问题解决方法
- phpopenssl_pkey_export生成私钥为空解决办法
- php字符串编码自动转换解决
- echarts多个报表宽度自适应解决办法_编程资料分享
- PHP 开发中解决并发问题的几种实现方法分析_编程资料分享
- PHP基于文件锁解决多进程同时读写一个文件问题示例
- php session_start无法开启和使用Cannot send session cache limiter - headers already sent错误解决方法