<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://jackxiang.com/post//</link>
<title><![CDATA[PHP中的PathInfo ]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Sat, 05 Jun 2010 08:36:30 +0000</pubDate> 
<guid>http://jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	PHP中的全局变量$_SERVER[&#039;PATH_INFO&#039;]是一个很有用的参数，众多的CMS系统在美化自己的URL的时候，都用到了这个参数。<br/><br/>对于下面这个网址：<br/><br/>http://www.test.com/index.php/foo/bar.html?c=index&amp;m=search<br/><br/>我们可以得到 $_SERVER[&#039;PATH_INFO&#039;] ＝ ‘/foo/bar.html’,而此时 $_SERVER[&#039;QUERY_STRING&#039;] = &#039;c=index&amp;m=search&#039;;<br/><br/>通常，我们最初开始PHP程序编写的时候，都会使用诸如： http://www.test.com/index.php?c=search&amp;m=main 这样的URL，这种URL不仅看起来非常奇怪，而且对于搜索引擎也是非常不友好的。很多搜索引擎收录的时候，都会忽略Query String之后的内容，google虽然不会忽略Query String，但是对于其他不含Query String的页面，会给于比较高的PR值。<br/><br/>下面是一段解析PATH_INFO的非常简单的代码：<br/><br/><br/><div class="code">&lt;?php<br/><br/>if( !isset( $_SERVER&#91;&#039;PATH_INFO&#039;&#93; ) )&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$pathinfo = &#039;default&#039;;<br/>&#125;else&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$pathinfo =&nbsp;&nbsp;explode(&#039;/&#039;, $_SERVER&#91;&#039;PATH_INFO&#039;&#93;);<br/>&#125;<br/><br/>if( is_array($pathinfo) AND !empty($pathinfo)&nbsp;&nbsp;)&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$page = $pathinfo&#91;1&#93;;<br/>&#125;else&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$page = &#039;a.php&#039;;<br/>&#125;<br/><br/>require &quot;$page.php&quot;;<br/><br/>?&gt;</div><br/><br/><br/><textarea name="code" class="php" rows="15" cols="100">
&lt;?php
 $a = pathinfo(&#039;ali-bj-hd://encodevideo/1df33be864364b04bb7ac3a6e3500c7c/2019_11_28_2eDBGGJ5sQ_450.mp4&#039;);
print_r($a);
exit;
</textarea><br/><br/>php&nbsp;&nbsp;b.php&nbsp;&nbsp;&nbsp;&nbsp;<br/>Array<br/>(<br/>&nbsp;&nbsp;&nbsp;&nbsp;[dirname] =&gt; ali-bj-hd://encodevideo/1df33be864364b04bb7ac3a6e3500c7c<br/>&nbsp;&nbsp;&nbsp;&nbsp;[basename] =&gt; 2019_11_28_2eDBGGJ5sQ_450.mp4<br/>&nbsp;&nbsp;&nbsp;&nbsp;[extension] =&gt; mp4<br/>&nbsp;&nbsp;&nbsp;&nbsp;[filename] =&gt; 2019_11_28_2eDBGGJ5sQ_450<br/>)
]]>
</description>
</item><item>
<link>http://jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] PHP中的PathInfo ]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>