<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://www.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://www.jackxiang.com/post//</link>
<title><![CDATA[ parse_ini_file -- 解析一个配置文件]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Wed, 23 Dec 2009 14:03:47 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	<br/><div class="code"><br/>&nbsp;&nbsp;private function getMcConf($type)&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$configs=parse_ini_file($this-&gt;dbconf,true);<br/>&nbsp;&nbsp;&nbsp;&nbsp;$config=$configs&#91;$type&#93;;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$host_port = $config&#91;&#039;host&#039;&#93;;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$hps=explode(&quot;,&quot;,$host_port);<br/>&nbsp;&nbsp;&nbsp;&nbsp;foreach($hps as $k)&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$ret&#91;&#93;=split(&quot;:&quot;,$k);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp;&nbsp;&nbsp;return $ret;<br/>&nbsp;&nbsp;&#125;</div><br/><br/><br/>参数一是字符串类型的参数，要传入的是配置文件的名称。 <br/>参数二是布尔类型的参数，要传入的是TRUE（布尔值）或FALSE（布尔值），该参数将会影响到配置文件读进数组后的结果。设置为TRUE会将配置文件中的数据以二维数组的方式建立，设置为FALSE则是使用一维数组。FALSE是默认值。 <br/>parse_ini_file 函数会将指定的“配置文件”依照 key 和 value 对应地读曀数组中，并依照第二个参数来决定要建立二维还是一维数组。 <br/>如果放在“配置文件”中的value 值包含非英文字母和非数字的字符，则该值要用双引号将它括起来。 <br/>在“配置文件”中的key 值，有一些保留字是不能使用的，包含：null、yes、no、true、false。 <br/>parse_ini_file 还可以搭配“常数”来使用，只要在调用 parse_ini_file 之前，先将要使用的常数定义好，然后再调用parse_ini_file ，则PHP就会将常数直接替换到数组的数据中。 <br/>提示：在“配置文件”中也是可以写“注释”，配置文件中的注释是用分号来开关的。 <br/>注意：如果读者使用建立一维数组的方式，则要注意“配置文件”中的key值名称不能重复，否则后面的数据会覆盖掉前面的数据，请读者注意。<br/><br/>
]]>
</description>
</item><item>
<link>http://www.jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论]  parse_ini_file -- 解析一个配置文件]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>