<?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 open_basedir的性能影响]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[Php/Js/Shell/Go]]></category>
<pubDate>Mon, 04 May 2015 09:54:39 +0000</pubDate> 
<guid>http://jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	最近研究安全性时，偶尔发现php.ini上并没有开启open_basedir，于是搜索了下，有人说开启后有性能影响，于是测试了一下。<br/> <br/>首先，交代一下环境：centos + nginx + php-fpm + php + mysql，典型的lnmp了。<br/> <br/>测试代码如下：<br/>Php代码&nbsp;&nbsp;收藏代码<br/><textarea name="code" class="php" rows="15" cols="100">
&lt;?php&nbsp;&nbsp;
function microtimeToFloat()&nbsp;&nbsp;
&#123;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;list($usec, $sec) = explode(&quot; &quot;, microtime());&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;return ((float)$usec + (float)$sec);&nbsp;&nbsp;
&#125;&nbsp;&nbsp;
&nbsp;&nbsp; 
$timeStart = microtimeToFloat();&nbsp;&nbsp;
for($i=0;$i&lt;100;$i++)&nbsp;&nbsp;
&#123;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;is_file(&#039;www.91loli.com.html&#039;);&nbsp;&nbsp;
&#125;&nbsp;&nbsp;
$timeEnd = microtimeToFloat();&nbsp;&nbsp;
$time = $timeEnd - $timeStart;&nbsp;&nbsp;
&nbsp;&nbsp; 
echo &quot;is_file in $time seconds&#92;n&quot;;&nbsp;&nbsp;
?&gt; 
</textarea><br/> 执行100次，实测结果是未开启open_basedir时大约是0.00001秒。<br/>开启后：0.001秒。<br/>性能相差100倍。<br/> <br/>在安全性和性能上，该怎么取舍呢。。。还是安全性吧？哈哈。。。<br/><br/>来自：http://exvision.iteye.com/blog/830506
]]>
</description>
</item><item>
<link>http://jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] php open_basedir的性能影响]]></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>