<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>LunarPages美国主机中文评测 &#187; gzip压缩</title>
	<atom:link href="https://lunarpages.org.cn/tag/gzip%e5%8e%8b%e7%bc%a9/feed/" rel="self" type="application/rss+xml" />
	<link>https://lunarpages.org.cn</link>
	<description></description>
	<lastBuildDate>Sat, 15 Jun 2019 02:18:50 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.8.36</generator>
	<item>
		<title>LunarPages虚拟主机中实现Gzip压缩输出方法</title>
		<link>https://lunarpages.org.cn/lunarpages-xuni-zhuji-gzip/</link>
		<comments>https://lunarpages.org.cn/lunarpages-xuni-zhuji-gzip/#comments</comments>
		<pubDate>Fri, 10 Jan 2014 08:20:24 +0000</pubDate>
		<dc:creator><![CDATA[user1]]></dc:creator>
				<category><![CDATA[其它]]></category>
		<category><![CDATA[gzip压缩]]></category>
		<category><![CDATA[lunarpages]]></category>

		<guid isPermaLink="false">http://lunarpages.org.cn/?p=232</guid>
		<description><![CDATA[大家都知道在虚拟主机中一般都有资源使用限制的，如果我们在LunarPages中启用Gzip可以将文件压缩到原来 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>大家都知道在虚拟主机中一般都有资源使用限制的，如果我们在<span style="color: #0000ff;"><a title="lunarpages官网" href="http://r2url.com/www.lunarpages.com"><span style="color: #0000ff;">LunarPages</span></a></span>中启用Gzip可以将文件压缩到原来的约1/4，也就是速度可以提高到原来的4倍，使用流量将减少到原来的1/4，因此建站大家在使用主机空间是开启Gzip压缩。</p>
<p>启用Gzip压缩需要设置以下两个步骤：</p>
<p>1、首先给所有的php文件启用gip压缩：</p>
<p>在php.ini中添加下面语句</p>
<p>output_buffering = Off<br />
output_handler =<br />
zlib.output_compression = On</p>
<p>这样就可以给所有php文件进行gzip压缩了。</p>
<p>2、下面为html页面启用gzip压缩，我们要做的就是让apache将html文件当作php文件处理即可。在.htaccess文件中加入下面的语句即可：</p>
<p>AddHandler x-httpd-php .html .htm</p>
<p>这样就可以为html文件htm文件启用gzip压缩了。</p>
<p><strong>备注：</strong>对于discuz，wordpress之类的程序，我们可以在后台开启gzip，而不需要这样设置，如果在后台已经启用gzip后就不用设置了，否则会报错。</p>
]]></content:encoded>
			<wfw:commentRss>https://lunarpages.org.cn/lunarpages-xuni-zhuji-gzip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The constant WPCACHEHOME must be set in the file wp-config.php and point at the WP Super Cache plugin directory. -->