<?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>page&#039;s blog &#187; PHP</title>
	<atom:link href="http://pageblogging.net/tag/php/feed" rel="self" type="application/rss+xml" />
	<link>http://pageblogging.net</link>
	<description>设计自己的生活````</description>
	<lastBuildDate>Mon, 19 Apr 2010 04:34:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>PHP判断浏览器种类</title>
		<link>http://pageblogging.net/2009/09/determine-the-browser-type.html</link>
		<comments>http://pageblogging.net/2009/09/determine-the-browser-type.html#comments</comments>
		<pubDate>Fri, 18 Sep 2009 07:42:13 +0000</pubDate>
		<dc:creator>page</dc:creator>
				<category><![CDATA[pagemod.cn]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://pageblogging.net/?p=358</guid>
		<description><![CDATA[众所周知IE6 在国内占有率奇高，使用者大多数是普通浏览者，即随机看客，是广告点击的有力军。 所以，对自己的站点添加了一个判断，如是IE6 即显示广告。 早先是以 1 &#60;!--[if lte IE 6]&#62;&#60;![endif]--&#62; 的形式来进行的，这种方法一般是模板作者用于调整网页布局而做出的妥协。 如今 这显示广告，涉及到js代码，使得网页结构混乱，不符合xhtml规则，这令本来就喜欢整齐的俺容忍不了。 所以找来google，选择了一个PHP判断语句，先新建了一个ggads.php的文件，里面添加广告代码，接着在网页上添加 1 2 3 4 &#60;?php if&#40;strpos&#40;$_SERVER&#91;'HTTP_USER_AGENT'&#93;, 'MSIE 6'&#41; !== false&#41; include &#40;TEMPLATEPATH . &#34;/ggads.php&#34;&#41;; ?&#62; 这样，就成了。 Related Posts再次解决IE6的问题IE的相关bugphp标签迷惑了IEIE果然很神奇可恶的IE Copyright © page for page&#039;s blog, 2009. &#124; Permalink &#124; 7 comments Post tags: IE, PHP Domain Name changed to http://pageblogging.net]]></description>
			<content:encoded><![CDATA[<p>众所周知IE6 在国内占有率奇高，使用者大多数是普通浏览者，即随机看客，是广告点击的有力军。<br />
所以，对自己的站点添加了一个判断，如是IE6 即显示广告。</p>
<p>早先是以</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!--[if lte IE 6]&gt;&lt;![endif]--&gt;</span></pre></td></tr></table></div>

<p>的形式来进行的，这种方法一般是模板作者用于调整网页布局而做出的妥协。</p>
<p>如今 这显示广告，涉及到js代码，使得网页结构混乱，不符合xhtml规则，这令本来就喜欢整齐的俺容忍不了。<br />
所以找来google，选择了一个PHP判断语句，先新建了一个ggads.php的文件，里面添加广告代码，接着在网页上添加</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>   
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">strpos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'MSIE 6'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!==</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span>
<span style="color: #b1b100;">include</span> <span style="color: #009900;">&#40;</span>TEMPLATEPATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;/ggads.php&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>这样，就成了。</p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://pageblogging.net/2009/01/bug-ie6.html" title="再次解决IE6的问题">再次解决IE6的问题</a></li><li><a href="http://pageblogging.net/2008/10/ie6-bugs.html" title="IE的相关bug">IE的相关bug</a></li><li><a href="http://pageblogging.net/2008/08/ie-ff-opera.html" title="php标签迷惑了IE">php标签迷惑了IE</a></li><li><a href="http://pageblogging.net/2008/06/ie-css-hacks.html" title="IE果然很神奇">IE果然很神奇</a></li><li><a href="http://pageblogging.net/2008/05/kewudeie.html" title="可恶的IE">可恶的IE</a></li></ul><hr />
<p>Copyright © page for <a href="http://pageblogging.net">page&#039;s blog</a>, 2009. |
<a href="http://pageblogging.net/2009/09/determine-the-browser-type.html">Permalink</a> |
<a href="http://pageblogging.net/2009/09/determine-the-browser-type.html#comments">7 comments</a> 

<br/>
Post tags: <a href="http://pageblogging.net/tag/ie" rel="tag">IE</a>, <a href="http://pageblogging.net/tag/php" rel="tag">PHP</a><br/>
Domain Name changed to http://pageblogging.net
</p>]]></content:encoded>
			<wfw:commentRss>http://pageblogging.net/2009/09/determine-the-browser-type.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
