先加载模块extension=php_zlib.dll
PHP代码:--------------------------------------------------------------------------------
<?php
$x="hello world";
$x=gzcompress($x) ; //压缩
echo $x ;
echo "<br>";
echo gzuncompress($x); //解压
?>
--------------------------------------------------------------------------------