<?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[[个人原创]PHP中把数组也打入到我们的文本中的一个调试函数]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Mon, 04 May 2009 03:33:34 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	平时多人调试程序的时候，特别是页面级别和接口调用级别的，往往不希望有一些输出，但是这个时候出现一个bug或者要调试一下返回值或者它有可能是一个数组，这个时候下面这个函数就可以派上用场了，呵呵：<br/><div class="code">&lt;?php<br/>/**<br/> * 把数组和字符串写入文件函数<br/> *<br/> * @param array or int string&nbsp;&nbsp;$everything<br/> * @param string $path<br/> */<br/>function array2log($everything,$path = &quot;/tmp/array2log.txt&quot;)<br/>&#123;<br/>&nbsp;&nbsp;if(is_array($everything))<br/>&nbsp;&nbsp;&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$everything = var_export ( $everything,True);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp;$return = file_put_contents($path,$everything,FILE_APPEND);&nbsp;&nbsp;<br/>&#125;<br/>$array = array(&quot;dfdfdf&quot;,&quot;dfdfdfdf&quot;,&quot;dfdf&quot;);<br/>array2log($array);<br/>?&gt;</div><br/><br/><br/><br/><div class="code">&#91;root@vm0000055 ~&#93;# tail -f /tmp/array2log.txt <br/>array (<br/>&nbsp;&nbsp;0 =&gt; &#039;dfdfdf&#039;,<br/>&nbsp;&nbsp;1 =&gt; &#039;dfdfdfdf&#039;,<br/>&nbsp;&nbsp;2 =&gt; &#039;dfdf&#039;,<br/>)<br/><br/><br/><br/><br/>array (<br/>&nbsp;&nbsp;0 =&gt; &#039;dfdfdf&#039;,<br/>&nbsp;&nbsp;1 =&gt; &#039;dfdfdfdf&#039;,<br/>&nbsp;&nbsp;2 =&gt; &#039;dfdf&#039;,<br/>)</div><br/><br/><br/>版权所有，请勿转载，要转载请注明出处，呵呵！
]]>
</description>
</item><item>
<link>http://www.jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] [个人原创]PHP中把数组也打入到我们的文本中的一个调试函数]]></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>