<?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 format格式化数字长度之sprintf，]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Thu, 28 Apr 2011 03:26:47 +0000</pubDate> 
<guid>http://jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	<a href="http://jackxiang.com/attachment.php?fid=156" target="_blank"><img src="http://jackxiang.com/attachment.php?fid=156" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/><br/>参考代码：<br/><textarea name="code" class="html" rows="15" cols="100">
&lt;?php
//$num = 12345678.9;
//$num = 12345678;
//echo&nbsp;&nbsp; number_format($num,&nbsp;&nbsp; 0,&nbsp;&nbsp; &quot;&quot;,&nbsp;&nbsp; &quot;,&quot;);
//---------------------------------------------

echo str_pad(&quot;30&quot;,7,&quot;0&quot;,STR_PAD_RIGHT);
echo str_pad(&quot;30&quot;,7,&quot;0&quot;,STR_PAD_LEFT);

echo sprintf(&quot;%010d&quot;,30);
echo sprintf(&quot;%-010s&quot;,30);
?&gt;
</textarea><br/><br/>备注：膘哥喜欢：str_pad：str_pad(strval(30),10);其他兄弟口味不一，有sprintf，来源与C的写法等。<br/><br/>PHP str_pad()函数中断处理地址信息泄露漏洞:<br/>http://www.nsfocus.net/vulndb/15147
]]>
</description>
</item><item>
<link>http://jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] php format格式化数字长度之sprintf，]]></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>