PHP
downloads | documentation | faq | getting help | mailing lists | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Secure Shell 2> <PHP 输入/输出流
Last updated: Sun, 25 Nov 2007

view this page in

压缩流

zlib: PHP 4.0.4 - PHP 4.2.3(仅用于带 fopencookie 的系统)

PHP 4.3.0 及以上版本支持 compress.zlib://compress.bzip2://

  • zlib:
  • compress.zlib://
  • compress.bzip2://

zlib:gzopen() 的工作方式相象,只除了流可以用于 fread() 和其它文件系统函数。自 PHP 4.3.0 起已不赞成使用,因为可能会和包含有“:”字符的文件名混淆,用 compress.zlib:// 代替。

compress.zlib://compress.bzip2:// 各自等同于 gzopen()bzopen(),并且可以在不支持 fopencookie 的系统中使用。

封装协议摘要
属性 支持
受限于 allow_url_fopen
允许读取
允许写入
允许附加
允许同时读写
支持 stat() 否,请使用 file:// 封装器统计压缩文件。
支持 unlink() 否,请使用 file:// 封装器删除压缩文件。
支持 rename()
支持 mkdir()
支持 rmdir()



add a note add a note User Contributed Notes
压缩流
joshualross at gmail dot com
19-Aug-2007 12:24
I had a difficult time finding how to use compress.zlib with an http resource so I thought I would post what I found
<?php
$file
= 'compress.zlib://http://www.example.com/myarchive.gz';
$fr = fopen($file, 'rb');
?>

Per the bugreport I found here (http://bugs.php.net/bug.php?id=29045)

Secure Shell 2> <PHP 输入/输出流
Last updated: Sun, 25 Nov 2007
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites