<?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将数据导出为xls格式的]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[生活笔记]]></category>
<pubDate>Mon, 14 Jul 2008 09:12:09 +0000</pubDate> 
<guid>http://jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	&lt;?php<br/>$year = $_REQUEST[&#039;year&#039;];<br/>$moth = $_REQUEST[&#039;moth&#039;];<br/>$title = &quot;新浪互联星空播客每日运营报表&quot;;<br/>$chword = iconv(&quot;UTF-8&quot;,&quot;GBK&quot;, $title); <br/>$filename = $year.iconv(&quot;UTF-8&quot;,&quot;GBK&quot;, &quot;年&quot;).$moth.iconv(&quot;UTF-8&quot;,&quot;GBK&quot;, &quot;月&quot;).$day.$chword;<br/>//$filename = $year.&quot;-&quot;.$moth;<br/>header(&quot;Content-type:application/vnd.ms-excel&quot;);<br/>//header(&quot;Content-Disposition:filename=test.xls&quot;);<br/>header(&quot;Content-Disposition:filename=&quot;.$filename.&quot;.xls&quot;);<br/><br/>$title = &quot;日期&#92;tPV&#92;tUIP&#92;t注册用户数&#92;t视频上传量&#92;t视频播放量&#92;t当日视频总量&#92;t当日视频播放总时长&#92;t&#92;n&quot;;<br/>echo iconv(&quot;UTF-8&quot;,&quot;GBK&quot;, $title);&nbsp;&nbsp;//由于php是utf8的编码，为此要转化为gbk到xsl中。。否则乱码<br/><br/>后面按照一定格式输出，比如用&quot;&#92;t&quot;来分割各个字段。<br/><br/>while (!$rs-&gt;EOF) <br/>{//遍历记录集<br/>&nbsp;&nbsp;$result=array(&quot;day_key&quot;=&gt;$rs-&gt;fields[&#039;day_key&#039;],&quot;pv&quot;=&gt;$rs-&gt;fields[&#039;pv&#039;],&quot;uip&quot;=&gt;$rs-&gt;fields[&#039;uip&#039;],&quot;reg_member&quot;=&gt; $rs-&gt;fields[&#039;reg_member&#039;],&quot;upload_ct&quot;=&gt;$rs-&gt;fields[&#039;upload_ct&#039;],&quot;play_ct&quot;=&gt;$rs-&gt;fields[&#039;play_ct&#039;],&quot;video_total&quot;=&gt;$rs-&gt;fields[&#039;video_total&#039;],&quot;play_time&quot;=&gt;$rs-&gt;fields[&#039;play_time&#039;]);&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;//echo count($result);<br/>&nbsp;&nbsp;foreach ($result as $value)<br/>&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;echo $value.&quot;&#92;t&quot;;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;}&nbsp;&nbsp;<br/>&nbsp;&nbsp;echo &quot;&#92;n&quot;;<br/>&nbsp;&nbsp;unset($result);&nbsp;&nbsp;<br/>&nbsp;&nbsp;$rs-&gt;MoveNext();//将指针指到下一条记录,不用的话,会出现死循环!<br/>}
]]>
</description>
</item><item>
<link>http://jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] 用php将数据导出为xls格式的]]></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>