使用新的PHP 5.4 gzopen
功能不存在。
除了gzopen
之外,我需要的所有其他Zlib函数都存在。
我做了一个测试,它向我展示了这个
Zlib exists gzopen does not exists
<?php
echo (extension_loaded('zlib')) ? 'Zlib exists' : 'Zlib does not exist';
echo '<br />';
echo (function_exists('gzopen')) ? 'gzopen exists' : 'gzopen does not exist';
?>
var_dump(get_extension_funcs('zlib'));
的结果是:
array(25) {
[0]=> string(10) "readgzfile"
[1]=> string(8) "gzrewind"
[2]=> string(7) "gzclose"
[3]=> string(5) "gzeof"
[4]=> string(6) "gzgetc"
[5]=> string(6) "gzgets"
[6]=> string(7) "gzgetss"
[7]=> string(6) "gzread"
[8]=> string(8) "gzopen64"
[9]=> string(10) "gzpassthru"
[10]=> string(8) "gzseek64"
[11]=> string(8) "gztell64"
[12]=> string(7) "gzwrite"
[13]=> string(6) "gzputs"
[14]=> string(6) "gzfile"
[15]=> string(10) "gzcompress"
[16]=> string(12) "gzuncompress"
[17]=> string(9) "gzdeflate"
[18]=> string(9) "gzinflate"
[19]=> string(8) "gzencode"
[20]=> string(8) "gzdecode"
[21]=> string(11) "zlib_encode"
[22]=> string(11) "zlib_decode"
[23]=> string(20) "zlib_get_coding_type"
[24]=> string(12) "ob_gzhandler"
}
还有其他人在PHP 5.4中遇到过同样的问题吗?你是怎么解决的?