Home > php教程 > php手册 > body text

如何压缩一段文本后存入mysql中

WBOY
Release: 2016-06-21 09:13:59
Original
1116 people have browsed it

mysql|压缩

先加载模块extension=php_zlib.dll

PHP代码:--------------------------------------------------------------------------------

$x="hello world";
$x=gzcompress($x) ; //压缩
echo $x ;
echo "
";
echo gzuncompress($x); //解压
?>

--------------------------------------------------------------------------------



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!