如何压缩一段文本后存入mysql
程序员文章站
2022-06-06 19:54:29
...
先加载模块extension=php_zlib.dll
PHP代码:--------------------------------------------------------------------------------
$x="hello world";
$x=gzcompress($x) ; //压缩
echo $x ;
echo "
";
echo gzuncompress($x); //解压
?>
--------------------------------------------------------------------------------
PHP代码:--------------------------------------------------------------------------------
$x="hello world";
$x=gzcompress($x) ; //压缩
echo $x ;
echo "
";
echo gzuncompress($x); //解压
?>
--------------------------------------------------------------------------------