<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sunshow LifePHP</title>
	<atom:link href="http://blog.sunshow.net/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sunshow.net</link>
	<description>回到最初的美好</description>
	<lastBuildDate>Tue, 02 Mar 2010 05:41:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>TestLink文件上传问题修复</title>
		<link>http://blog.sunshow.net/2009/02/testlink-upload-problem/</link>
		<comments>http://blog.sunshow.net/2009/02/testlink-upload-problem/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 08:52:32 +0000</pubDate>
		<dc:creator>Sunshow</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[FCKEditor]]></category>
		<category><![CDATA[TestLink]]></category>
		<category><![CDATA[上传]]></category>

		<guid isPermaLink="false">http://blog.sunshow.net/?p=666</guid>
		<description><![CDATA[默认安装TestLink完毕后，内置的FCKEditor配置居然是使用ASP的，要将其修改为使用PHP
编辑third_party/fckeditor/fckconfig.js
查找以下行并去掉行首的注释：
FCKConfig.ProtectedSource.Add( /&#60;?[sS]*??&#62;/g ) ;&#160; &#160; // PHP style server side code
查找以下代码，并将其中的asp改成php
var _FileBrowserLanguage = 'asp' ; // asp &#124; aspx &#124; cfm &#124; lasso &#124; perl &#124; php &#124; pyvar _QuickUploadLanguage = 'asp' ; // asp &#124; aspx &#124; cfm &#124; lasso &#124; php
编辑以下两个文件
third_party/fckeditor/editor/filemanager/browser/default/connectors/php/config.php
third_party/fckeditor/editor/filemanager/upload/php/config.php
修改两个变量：
$Config['UserFilesPath'] = '/TestLink/userfiles/' ; //WEB URL&#160;$Config['UserFilesAbsolutePath'] = '/data/testlink/userfiles/' ; //AbsolutePath
注意：这两个变量的修改并不是必需的，只有当TestLink的安装位置不在根目录，或者使用了Alias(别名)的时候才需要
然后确保userfiles目录具有写权限
Change Log:
2009.11.30 在最新版本(1.8.4)中，还需要手工启用文件上传功能
编辑third_party/fckeditor/editor/filemanager/upload/php/config.php：
// SECURITY: [...]]]></description>
			<content:encoded><![CDATA[<p>默认安装TestLink完毕后，内置的FCKEditor配置居然是使用ASP的，要将其修改为使用PHP</p>
<p>编辑third_party/fckeditor/fckconfig.js<br />
查找以下行并去掉行首的注释：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">FCKConfig.ProtectedSource.Add( /</span><span style="color: Blue;">&lt;?</span><span style="color: Olive;">[</span><span style="color: Blue;">sS</span><span style="color: Olive;">]</span><span style="color: Gray;">*?</span><span style="color: Blue;">?&gt;</span><span style="color: Gray;">/g ) ;&nbsp; &nbsp; // PHP style server side code</span></div></div>
<p>查找以下代码，并将其中的asp改成php</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Green;">var</span><span style="color: Gray;"> </span><span style="color: Blue;">_FileBrowserLanguage</span><span style="color: Gray;"> = </span><span style="color: #8b0000;">'</span><span style="color: Red;">asp</span><span style="color: #8b0000;">'</span><span style="color: Gray;"> ; </span><span style="color: #ffa500;">// asp | aspx | cfm | lasso | perl | php | py</span><span style="color: Gray;"><br /></span><span style="color: Green;">var</span><span style="color: Gray;"> </span><span style="color: Blue;">_QuickUploadLanguage</span><span style="color: Gray;"> = </span><span style="color: #8b0000;">'</span><span style="color: Red;">asp</span><span style="color: #8b0000;">'</span><span style="color: Gray;"> ; </span><span style="color: #ffa500;">// asp | aspx | cfm | lasso | php</span><span style="color: Gray;"></span></div></div>
<p>编辑以下两个文件<br />
third_party/fckeditor/editor/filemanager/browser/default/connectors/php/config.php<br />
third_party/fckeditor/editor/filemanager/upload/php/config.php<br />
修改两个变量：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: #00008b;">$Config</span><span style="color: Olive;">[</span><span style="color: #8b0000;">'</span><span style="color: Red;">UserFilesPath</span><span style="color: #8b0000;">'</span><span style="color: Olive;">]</span><span style="color: Gray;"> = </span><span style="color: #8b0000;">'</span><span style="color: Red;">/TestLink/userfiles/</span><span style="color: #8b0000;">'</span><span style="color: Gray;"> ; </span><span style="color: #ffa500;">//WEB URL</span><span style="color: Gray;"><br />&nbsp;<br /></span><span style="color: #00008b;">$Config</span><span style="color: Olive;">[</span><span style="color: #8b0000;">'</span><span style="color: Red;">UserFilesAbsolutePath</span><span style="color: #8b0000;">'</span><span style="color: Olive;">]</span><span style="color: Gray;"> = </span><span style="color: #8b0000;">'</span><span style="color: Red;">/data/testlink/userfiles/</span><span style="color: #8b0000;">'</span><span style="color: Gray;"> ; </span><span style="color: #ffa500;">//AbsolutePath</span><span style="color: Gray;"></span></div></div>
<p>注意：这两个变量的修改并不是必需的，只有当TestLink的安装位置不在根目录，或者使用了Alias(别名)的时候才需要</p>
<p>然后确保userfiles目录具有写权限</p>
<p>Change Log:<br />
2009.11.30 在最新版本(1.8.4)中，还需要手工启用文件上传功能<br />
编辑third_party/fckeditor/editor/filemanager/upload/php/config.php：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: #ffa500;">// SECURITY: You must explicitelly enable this &quot;uploader&quot;.</span><span style="color: Gray;"><br /></span><span style="color: #00008b;">$Config</span><span style="color: Olive;">[</span><span style="color: #8b0000;">'</span><span style="color: Red;">Enabled</span><span style="color: #8b0000;">'</span><span style="color: Olive;">]</span><span style="color: Gray;"> = </span><span style="color: Green;">false</span><span style="color: Gray;"> ;</span></div></div>
<p>将false改为true</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fblog.sunshow.net%2F2009%2F02%2Ftestlink-upload-problem%2F&amp;title=TestLink%E6%96%87%E4%BB%B6%E4%B8%8A%E4%BC%A0%E9%97%AE%E9%A2%98%E4%BF%AE%E5%A4%8D"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fblog.sunshow.net%2F2009%2F02%2Ftestlink-upload-problem%2F&amp;title=TestLink%E6%96%87%E4%BB%B6%E4%B8%8A%E4%BC%A0%E9%97%AE%E9%A2%98%E4%BF%AE%E5%A4%8D"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.sunshow.net%2F2009%2F02%2Ftestlink-upload-problem%2F&amp;title=TestLink%E6%96%87%E4%BB%B6%E4%B8%8A%E4%BC%A0%E9%97%AE%E9%A2%98%E4%BF%AE%E5%A4%8D"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fblog.sunshow.net%2F2009%2F02%2Ftestlink-upload-problem%2F&amp;headline=TestLink%E6%96%87%E4%BB%B6%E4%B8%8A%E4%BC%A0%E9%97%AE%E9%A2%98%E4%BF%AE%E5%A4%8D"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=TestLink%E6%96%87%E4%BB%B6%E4%B8%8A%E4%BC%A0%E9%97%AE%E9%A2%98%E4%BF%AE%E5%A4%8D&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2009%2F02%2Ftestlink-upload-problem%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=TestLink%E6%96%87%E4%BB%B6%E4%B8%8A%E4%BC%A0%E9%97%AE%E9%A2%98%E4%BF%AE%E5%A4%8D&amp;u=http%3A%2F%2Fblog.sunshow.net%2F2009%2F02%2Ftestlink-upload-problem%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=TestLink%E6%96%87%E4%BB%B6%E4%B8%8A%E4%BC%A0%E9%97%AE%E9%A2%98%E4%BF%AE%E5%A4%8D&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2009%2F02%2Ftestlink-upload-problem%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=TestLink%E6%96%87%E4%BB%B6%E4%B8%8A%E4%BC%A0%E9%97%AE%E9%A2%98%E4%BF%AE%E5%A4%8D&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2009%2F02%2Ftestlink-upload-problem%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=TestLink%E6%96%87%E4%BB%B6%E4%B8%8A%E4%BC%A0%E9%97%AE%E9%A2%98%E4%BF%AE%E5%A4%8D&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2009%2F02%2Ftestlink-upload-problem%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2009%2F02%2Ftestlink-upload-problem%2F&amp;title=TestLink%E6%96%87%E4%BB%B6%E4%B8%8A%E4%BC%A0%E9%97%AE%E9%A2%98%E4%BF%AE%E5%A4%8D&amp;summary=&amp;source="><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fblog.sunshow.net%2F2009%2F02%2Ftestlink-upload-problem%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fblog.sunshow.net%2F2009%2F02%2Ftestlink-upload-problem%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/reader/link?url=http%3A%2F%2Fblog.sunshow.net%2F2009%2F02%2Ftestlink-upload-problem%2F&amp;title=TestLink%E6%96%87%E4%BB%B6%E4%B8%8A%E4%BC%A0%E9%97%AE%E9%A2%98%E4%BF%AE%E5%A4%8D"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>
	<div style="clear:both;"></div>标签：<a href="http://blog.sunshow.net/tag/fckeditor/" title="FCKEditor" rel="tag">FCKEditor</a>, <a href="http://blog.sunshow.net/tag/php/" title="PHP" rel="tag">PHP</a>, <a href="http://blog.sunshow.net/tag/testlink/" title="TestLink" rel="tag">TestLink</a>, <a href="http://blog.sunshow.net/tag/%e4%b8%8a%e4%bc%a0/" title="上传" rel="tag">上传</a><br /><br />

	<div style="clear:both;"></div><strong>相关日志</strong>
	<ul class="st-related-posts">
	<li><a href="http://blog.sunshow.net/2006/07/remove-extra-blank-lines/" title="删除字符串中多余的换行 (2006-07-22)">删除字符串中多余的换行</a> (5)</li>
	<li><a href="http://blog.sunshow.net/2006/08/%e8%bd%ac%e8%bd%bdphpgd%e7%9a%84%e5%ae%89%e8%a3%85/" title="[转载]PHP+GD的安装 (2006-08-26)">[转载]PHP+GD的安装</a> (2)</li>
	<li><a href="http://blog.sunshow.net/2007/03/%e8%bd%ac%e8%bd%bd%e6%95%b4%e7%90%86wordpress%e4%b8%8a%e4%bc%a0%e6%96%87%e4%bb%b6%e7%b1%bb%e5%9e%8b%e9%99%90%e5%88%b6%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95/" title="[转载+整理]Wordpress上传文件类型限制解决办法 (2007-03-08)">[转载+整理]Wordpress上传文件类型限制解决办法</a> (1)</li>
	<li><a href="http://blog.sunshow.net/2009/06/upload-file-using-curl/" title="Curl上传文件 (2009-06-29)">Curl上传文件</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://blog.sunshow.net/2009/02/testlink-upload-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RunCode更新</title>
		<link>http://blog.sunshow.net/2008/07/runcode%e6%9b%b4%e6%96%b0/</link>
		<comments>http://blog.sunshow.net/2008/07/runcode%e6%9b%b4%e6%96%b0/#comments</comments>
		<pubDate>Thu, 17 Jul 2008 13:29:00 +0000</pubDate>
		<dc:creator>Sunshow</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[run]]></category>
		<category><![CDATA[插件]]></category>
		<category><![CDATA[更新]]></category>
		<category><![CDATA[语言]]></category>

		<guid isPermaLink="false">http://blog.sunshow.net/?p=622</guid>
		<description><![CDATA[更新日志
v1.0
添加多语言支持。
新功能：复制到剪贴板。
插件主页：http://blog.sunshow.net/archives/367.html
WordPress的插件页：http://wordpress.org/extend/plugins/runcode/
心得体会：学习了一些有关多语言支持的知识

	标签：code, plugin, run, WordPress, 插件, 更新, 语言

	相关日志
	
	插件更新：Ultimate Tag Warrior (2)
	Windows Media Player Firefox Plugin (1)
	[转载+整理]Wordpress上传文件类型限制解决办法 (1)
	RunCode - plugin to show your code (32)
	Wordpress Thread Comment (8)


]]></description>
			<content:encoded><![CDATA[<p>更新日志<br />
v1.0<br />
添加多语言支持。<br />
新功能：复制到剪贴板。</p>
<p>插件主页：<a href="http://blog.sunshow.net/archives/367.html">http://blog.sunshow.net/archives/367.html</a><br />
WordPress的插件页：<a href="http://wordpress.org/extend/plugins/runcode/">http://wordpress.org/extend/plugins/runcode/</a></p>
<p>心得体会：学习了一些有关多语言支持的知识</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fblog.sunshow.net%2F2008%2F07%2Fruncode%25e6%259b%25b4%25e6%2596%25b0%2F&amp;title=RunCode%E6%9B%B4%E6%96%B0"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fblog.sunshow.net%2F2008%2F07%2Fruncode%25e6%259b%25b4%25e6%2596%25b0%2F&amp;title=RunCode%E6%9B%B4%E6%96%B0"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.sunshow.net%2F2008%2F07%2Fruncode%25e6%259b%25b4%25e6%2596%25b0%2F&amp;title=RunCode%E6%9B%B4%E6%96%B0"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fblog.sunshow.net%2F2008%2F07%2Fruncode%25e6%259b%25b4%25e6%2596%25b0%2F&amp;headline=RunCode%E6%9B%B4%E6%96%B0"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=RunCode%E6%9B%B4%E6%96%B0&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2008%2F07%2Fruncode%25e6%259b%25b4%25e6%2596%25b0%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=RunCode%E6%9B%B4%E6%96%B0&amp;u=http%3A%2F%2Fblog.sunshow.net%2F2008%2F07%2Fruncode%25e6%259b%25b4%25e6%2596%25b0%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=RunCode%E6%9B%B4%E6%96%B0&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2008%2F07%2Fruncode%25e6%259b%25b4%25e6%2596%25b0%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=RunCode%E6%9B%B4%E6%96%B0&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2008%2F07%2Fruncode%25e6%259b%25b4%25e6%2596%25b0%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=RunCode%E6%9B%B4%E6%96%B0&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2008%2F07%2Fruncode%25e6%259b%25b4%25e6%2596%25b0%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2008%2F07%2Fruncode%25e6%259b%25b4%25e6%2596%25b0%2F&amp;title=RunCode%E6%9B%B4%E6%96%B0&amp;summary=&amp;source="><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fblog.sunshow.net%2F2008%2F07%2Fruncode%25e6%259b%25b4%25e6%2596%25b0%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fblog.sunshow.net%2F2008%2F07%2Fruncode%25e6%259b%25b4%25e6%2596%25b0%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/reader/link?url=http%3A%2F%2Fblog.sunshow.net%2F2008%2F07%2Fruncode%25e6%259b%25b4%25e6%2596%25b0%2F&amp;title=RunCode%E6%9B%B4%E6%96%B0"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>
	<div style="clear:both;"></div>标签：<a href="http://blog.sunshow.net/tag/code/" title="code" rel="tag">code</a>, <a href="http://blog.sunshow.net/tag/plugin/" title="plugin" rel="tag">plugin</a>, <a href="http://blog.sunshow.net/tag/run/" title="run" rel="tag">run</a>, <a href="http://blog.sunshow.net/tag/wordpress/" title="WordPress" rel="tag">WordPress</a>, <a href="http://blog.sunshow.net/tag/%e6%8f%92%e4%bb%b6/" title="插件" rel="tag">插件</a>, <a href="http://blog.sunshow.net/tag/%e6%9b%b4%e6%96%b0/" title="更新" rel="tag">更新</a>, <a href="http://blog.sunshow.net/tag/%e8%af%ad%e8%a8%80/" title="语言" rel="tag">语言</a><br /><br />

	<div style="clear:both;"></div><strong>相关日志</strong>
	<ul class="st-related-posts">
	<li><a href="http://blog.sunshow.net/2007/04/%e6%8f%92%e4%bb%b6%e6%9b%b4%e6%96%b0%ef%bc%9aultimate-tag-warrior/" title="插件更新：Ultimate Tag Warrior (2007-04-27)">插件更新：Ultimate Tag Warrior</a> (2)</li>
	<li><a href="http://blog.sunshow.net/2007/04/windows-media-player-firefox-plugin/" title="Windows Media Player Firefox Plugin (2007-04-18)">Windows Media Player Firefox Plugin</a> (1)</li>
	<li><a href="http://blog.sunshow.net/2007/03/%e8%bd%ac%e8%bd%bd%e6%95%b4%e7%90%86wordpress%e4%b8%8a%e4%bc%a0%e6%96%87%e4%bb%b6%e7%b1%bb%e5%9e%8b%e9%99%90%e5%88%b6%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95/" title="[转载+整理]Wordpress上传文件类型限制解决办法 (2007-03-08)">[转载+整理]Wordpress上传文件类型限制解决办法</a> (1)</li>
	<li><a href="http://blog.sunshow.net/2007/03/wordpress-runcode-plugin/" title="RunCode - plugin to show your code (2007-03-15)">RunCode - plugin to show your code</a> (32)</li>
	<li><a href="http://blog.sunshow.net/2008/02/wordpress-thread-comment/" title="Wordpress Thread Comment (2008-02-22)">Wordpress Thread Comment</a> (8)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://blog.sunshow.net/2008/07/runcode%e6%9b%b4%e6%96%b0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Anti Spam Image 算术版</title>
		<link>http://blog.sunshow.net/2007/05/%e7%ae%97%e6%9c%af%e7%89%88anti-spam-image/</link>
		<comments>http://blog.sunshow.net/2007/05/%e7%ae%97%e6%9c%af%e7%89%88anti-spam-image/#comments</comments>
		<pubDate>Tue, 01 May 2007 05:34:22 +0000</pubDate>
		<dc:creator>Sunshow</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[插件]]></category>
		<category><![CDATA[算术]]></category>
		<category><![CDATA[验证码]]></category>

		<guid isPermaLink="false">http://www.sunshow.net/blog/archives/429.html</guid>
		<description><![CDATA[原插件地址：http://www.infor96.com/~nio/archives/369
比较懒，直接把Challenge里头的算法复制了过来，这样可以和WP-Cache插件配合工作了。
下载：anti_spam_image.txt
使用方法：将扩展名更改为.php，然后复制到WP的插件目录下，在管理界面启用即可。

	标签：spam, WordPress, 插件, 算术, 验证码

	相关日志
	
	Simple Tags导致的Feed输出问题 (0)
	验证码又有新玩法 (3)
	更改Permalink (6)
	大伙来算术 (1)
	WP-Forum (3)


]]></description>
			<content:encoded><![CDATA[<p>原插件地址：http://www.infor96.com/~nio/archives/369</p>
<p>比较懒，直接把Challenge里头的算法复制了过来，这样可以和WP-Cache插件配合工作了。</p>
<p>下载：<a href='http://www.sunshow.net/blog/wp-content/uploads/2007/05/anti_spam_image.txt' title='anti_spam_image.txt'>anti_spam_image.txt</a><br />
使用方法：将扩展名更改为.php，然后复制到WP的插件目录下，在管理界面启用即可。</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F05%2F%25e7%25ae%2597%25e6%259c%25af%25e7%2589%2588anti-spam-image%2F&amp;title=Anti+Spam+Image+%E7%AE%97%E6%9C%AF%E7%89%88"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F05%2F%25e7%25ae%2597%25e6%259c%25af%25e7%2589%2588anti-spam-image%2F&amp;title=Anti+Spam+Image+%E7%AE%97%E6%9C%AF%E7%89%88"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F05%2F%25e7%25ae%2597%25e6%259c%25af%25e7%2589%2588anti-spam-image%2F&amp;title=Anti+Spam+Image+%E7%AE%97%E6%9C%AF%E7%89%88"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fblog.sunshow.net%2F2007%2F05%2F%25e7%25ae%2597%25e6%259c%25af%25e7%2589%2588anti-spam-image%2F&amp;headline=Anti+Spam+Image+%E7%AE%97%E6%9C%AF%E7%89%88"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Anti+Spam+Image+%E7%AE%97%E6%9C%AF%E7%89%88&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F05%2F%25e7%25ae%2597%25e6%259c%25af%25e7%2589%2588anti-spam-image%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Anti+Spam+Image+%E7%AE%97%E6%9C%AF%E7%89%88&amp;u=http%3A%2F%2Fblog.sunshow.net%2F2007%2F05%2F%25e7%25ae%2597%25e6%259c%25af%25e7%2589%2588anti-spam-image%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Anti+Spam+Image+%E7%AE%97%E6%9C%AF%E7%89%88&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F05%2F%25e7%25ae%2597%25e6%259c%25af%25e7%2589%2588anti-spam-image%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Anti+Spam+Image+%E7%AE%97%E6%9C%AF%E7%89%88&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F05%2F%25e7%25ae%2597%25e6%259c%25af%25e7%2589%2588anti-spam-image%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Anti+Spam+Image+%E7%AE%97%E6%9C%AF%E7%89%88&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F05%2F%25e7%25ae%2597%25e6%259c%25af%25e7%2589%2588anti-spam-image%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F05%2F%25e7%25ae%2597%25e6%259c%25af%25e7%2589%2588anti-spam-image%2F&amp;title=Anti+Spam+Image+%E7%AE%97%E6%9C%AF%E7%89%88&amp;summary=&amp;source="><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fblog.sunshow.net%2F2007%2F05%2F%25e7%25ae%2597%25e6%259c%25af%25e7%2589%2588anti-spam-image%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fblog.sunshow.net%2F2007%2F05%2F%25e7%25ae%2597%25e6%259c%25af%25e7%2589%2588anti-spam-image%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/reader/link?url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F05%2F%25e7%25ae%2597%25e6%259c%25af%25e7%2589%2588anti-spam-image%2F&amp;title=Anti+Spam+Image+%E7%AE%97%E6%9C%AF%E7%89%88"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>
	<div style="clear:both;"></div>标签：<a href="http://blog.sunshow.net/tag/spam/" title="spam" rel="tag">spam</a>, <a href="http://blog.sunshow.net/tag/wordpress/" title="WordPress" rel="tag">WordPress</a>, <a href="http://blog.sunshow.net/tag/%e6%8f%92%e4%bb%b6/" title="插件" rel="tag">插件</a>, <a href="http://blog.sunshow.net/tag/%e7%ae%97%e6%9c%af/" title="算术" rel="tag">算术</a>, <a href="http://blog.sunshow.net/tag/%e9%aa%8c%e8%af%81%e7%a0%81/" title="验证码" rel="tag">验证码</a><br /><br />

	<div style="clear:both;"></div><strong>相关日志</strong>
	<ul class="st-related-posts">
	<li><a href="http://blog.sunshow.net/2007/11/simple-tags%e5%af%bc%e8%87%b4%e7%9a%84feed%e8%be%93%e5%87%ba%e9%97%ae%e9%a2%98/" title="Simple Tags导致的Feed输出问题 (2007-11-10)">Simple Tags导致的Feed输出问题</a> (0)</li>
	<li><a href="http://blog.sunshow.net/2008/01/%e9%aa%8c%e8%af%81%e7%a0%81%e5%8f%88%e6%9c%89%e6%96%b0%e7%8e%a9%e6%b3%95/" title="验证码又有新玩法 (2008-01-07)">验证码又有新玩法</a> (3)</li>
	<li><a href="http://blog.sunshow.net/2009/03/modify-permalink/" title="更改Permalink (2009-03-25)">更改Permalink</a> (6)</li>
	<li><a href="http://blog.sunshow.net/2007/04/%e5%a4%a7%e4%bc%99%e6%9d%a5%e7%ae%97%e6%9c%af/" title="大伙来算术 (2007-04-30)">大伙来算术</a> (1)</li>
	<li><a href="http://blog.sunshow.net/2006/12/wp-forum/" title="WP-Forum (2006-12-15)">WP-Forum</a> (3)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://blog.sunshow.net/2007/05/%e7%ae%97%e6%9c%af%e7%89%88anti-spam-image/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Recent Comments 中文改良版</title>
		<link>http://blog.sunshow.net/2007/04/wordpress-get-recent-comments-plugin-cjk/</link>
		<comments>http://blog.sunshow.net/2007/04/wordpress-get-recent-comments-plugin-cjk/#comments</comments>
		<pubDate>Wed, 18 Apr 2007 12:27:13 +0000</pubDate>
		<dc:creator>Sunshow</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[comment]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[substr]]></category>
		<category><![CDATA[utf8]]></category>
		<category><![CDATA[wbr]]></category>
		<category><![CDATA[wordwrap]]></category>
		<category><![CDATA[中文]]></category>
		<category><![CDATA[评论]]></category>

		<guid isPermaLink="false">http://www.sunshow.net/blog/archives/418.html</guid>
		<description><![CDATA[注意：转载本文请说明出处，谴责赤裸裸的剽窃行为！
正式弃用了中文工具箱，采用Get Recent Comments插件来显示最新评论。
这个插件可以在后台设置在每隔多少长度插入一个空格来防止因为评论过长破坏页面布局，但是因为中文问题原版插件在插入空格时可能插入到一个中文字符的中间从而导致乱码问题，这里提供一个自己改良了的版本。
原版插件默认使用的是空格来插入评论达到换行的目的，我换成了&#60;wbr /&#62;(软换行标签，表示此处可换行)。好处是评论显示时都是连续的而不会产生多余的空格，可能存在的问题是此标签不被某些浏览器所支持，根据需要自己修改一下参数即可。

调用方法：
&#60;?php if (function_exists('get_recent_comments')) { ?&#62;&#160;&#160; &#160;&#60;h2&#62;Recent Comments&#60;/h2&#62;&#160;&#160; &#160; &#160; &#160;&#60;ul&#62;&#160;&#160; &#160; &#160; &#160;&#60;?php get_recent_comments(); ?&#62;&#160;&#160; &#160; &#160; &#160;&#60;/ul&#62;&#60;?php } ?&#62;


下载：
Get Recent Comments(based on v2.0.2, for WP 2.3 and later version)
更新日志：
2007-09-26 作者很勤快，我也勤快点，更新至v2.0.2，增加包含/不包含分类的选项设置
2007-09-25 基于原版2.0修改适应WordPress 2.3的最新版本，节约数据库开销，修复若干bug，推荐更新


下载：
Get Recent Comments(based on v1.5.5, for WP 2.2 and earlier version)
更新日志：
更新1：修改了执行utf8_wordwrap的顺序，先截取摘要再插入标签，解决截断标签的问题和因为插入标签影响截取长度的问题。
更新2：有时候最新评论并不马上出现，这是因为使用了cache的原因，对于我这样已经使用了WP_Cache插件的用户来说并无意义，最简单的更改方法是搜索“$use_cache = TRUE;”，将TRUE改为FALSE并保存。
更新3@2007-05-01：删除一句可能导致程序执行错误的语句，不明白原作者的意图
更新4@2007-05-27：修复由于插件调用WP的wptexturize函数导致的乱码问题，改为先截取以后再执行wptexturize
更新6@2007-08-09：完全解决末尾半个字符的问题
更新7@2007-08-10：修正一个以前的错误逻辑，可能导致插入过多的无效标签

更改方法：
function&#160;utf8_trim($str) {
&#160;
&#160; &#160; $len = strlen($str);
&#160;
&#160; &#160; for&#160;($i=strlen($str)-1; [...]]]></description>
			<content:encoded><![CDATA[<p>注意：转载本文请说明出处，谴责赤裸裸的剽窃行为！</p>
<p>正式弃用了中文工具箱，采用Get Recent Comments插件来显示最新评论。</p>
<p>这个插件可以在后台设置在每隔多少长度插入一个空格来防止因为评论过长破坏页面布局，但是因为中文问题原版插件在插入空格时可能插入到一个中文字符的中间从而导致乱码问题，这里提供一个自己改良了的版本。</p>
<p>原版插件默认使用的是空格来插入评论达到换行的目的，我换成了&lt;wbr /&gt;(软换行标签，表示此处可换行)。好处是评论显示时都是连续的而不会产生多余的空格，可能存在的问题是此标签不被某些浏览器所支持，根据需要自己修改一下参数即可。</p>
<blockquote><p>
调用方法：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Green;">if</span><span style="color: Gray;"> </span><span style="color: Olive;">(</span><span style="color: Blue;">function_exists</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">get_recent_comments</span><span style="color: #8b0000;">'</span><span style="color: Olive;">))</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;"> </span><span style="color: Blue;">?&gt;</span><span style="color: Black;"><br />&nbsp;&nbsp; &nbsp;&lt;h2&gt;Recent Comments&lt;/h2&gt;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&lt;ul&gt;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">get_recent_comments</span><span style="color: Olive;">()</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Black;"><br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&lt;/ul&gt;<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Olive;">}</span><span style="color: Gray;"> </span><span style="color: Blue;">?&gt;</span></div></div>
</blockquote>
<blockquote><p>
下载：<br />
<a href='http://www.sunshow.net/blog/wp-content/uploads/2007/09/get-recent-comments-wp23.zip' title='Get Recent Comments'>Get Recent Comments(based on v2.0.2, for WP 2.3 and later version)</a><br />
更新日志：<br />
2007-09-26 作者很勤快，我也勤快点，更新至v2.0.2，增加包含/不包含分类的选项设置<br />
2007-09-25 基于原版2.0修改适应WordPress 2.3的最新版本，节约数据库开销，修复若干bug，推荐更新
</p></blockquote>
<blockquote><p>
下载：<br />
<a href='http://www.sunshow.net/blog/wp-content/uploads/2007/05/get-recent-comments.zip' title='Get Recent Comments'>Get Recent Comments(based on v1.5.5, for WP 2.2 and earlier version)</a><br />
更新日志：<br />
更新1：修改了执行utf8_wordwrap的顺序，先截取摘要再插入标签，解决截断标签的问题和因为插入标签影响截取长度的问题。</p>
<p>更新2：有时候最新评论并不马上出现，这是因为使用了cache的原因，对于我这样已经使用了WP_Cache插件的用户来说并无意义，最简单的更改方法是搜索“$use_cache = TRUE;”，将TRUE改为FALSE并保存。</p>
<p>更新3@2007-05-01：删除一句可能导致程序执行错误的语句，不明白原作者的意图</p>
<p>更新4@2007-05-27：修复由于插件调用WP的wptexturize函数导致的乱码问题，改为先截取以后再执行wptexturize</p>
<p>更新6@2007-08-09：完全解决末尾半个字符的问题</p>
<p>更新7@2007-08-10：修正一个以前的错误逻辑，可能导致插入过多的无效标签
</p></blockquote>
<p>更改方法：</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: Green;">function</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">utf8_trim</span><span style="color: Olive;">(</span><span style="color: #00008b;">$str</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: #00008b;">$len</span><span style="color: Gray;"> = </span><span style="color: Blue;">strlen</span><span style="color: Olive;">(</span><span style="color: #00008b;">$str</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">for</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">(</span><span style="color: #00008b;">$i</span><span style="color: Gray;">=</span><span style="color: Blue;">strlen</span><span style="color: Olive;">(</span><span style="color: #00008b;">$str</span><span style="color: Olive;">)</span><span style="color: Gray;">-</span><span style="color: Maroon;">1</span><span style="color: Gray;">; </span><span style="color: #00008b;">$i</span><span style="color: Gray;">&gt;=</span><span style="color: Maroon;">0</span><span style="color: Gray;">; </span><span style="color: #00008b;">$i</span><span style="color: Gray;">-=</span><span style="color: Maroon;">1</span><span style="color: Olive;">){</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$hex</span><span style="color: Gray;"> .= </span><span style="color: #8b0000;">'</span><span style="color: Red;">&nbsp;</span><span style="color: #8b0000;">'</span><span style="color: Gray;">.</span><span style="color: Blue;">ord</span><span style="color: Olive;">(</span><span style="color: #00008b;">$str</span><span style="color: Olive;">[</span><span style="color: #00008b;">$i</span><span style="color: Olive;">])</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$ch</span><span style="color: Gray;"> = </span><span style="color: Blue;">ord</span><span style="color: Olive;">(</span><span style="color: #00008b;">$str</span><span style="color: Olive;">[</span><span style="color: #00008b;">$i</span><span style="color: Olive;">])</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">((</span><span style="color: #00008b;">$ch</span><span style="color: Gray;"> &amp; </span><span style="color: Maroon;">128</span><span style="color: Olive;">)</span><span style="color: Gray;">==</span><span style="color: Maroon;">0</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Green;">return</span><span style="color: Olive;">(</span><span style="color: Blue;">substr</span><span style="color: Olive;">(</span><span style="color: #00008b;">$str</span><span style="color: Gray;">,</span><span style="color: Maroon;">0</span><span style="color: Gray;">,</span><span style="color: #00008b;">$i</span><span style="color: Olive;">))</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">((</span><span style="color: #00008b;">$ch</span><span style="color: Gray;"> &amp; </span><span style="color: Maroon;">192</span><span style="color: Olive;">)</span><span style="color: Gray;">==</span><span style="color: Maroon;">192</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Green;">return</span><span style="color: Olive;">(</span><span style="color: Blue;">substr</span><span style="color: Olive;">(</span><span style="color: #00008b;">$str</span><span style="color: Gray;">,</span><span style="color: Maroon;">0</span><span style="color: Gray;">,</span><span style="color: #00008b;">$i</span><span style="color: Olive;">))</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">return</span><span style="color: Olive;">(</span><span style="color: #00008b;">$str</span><span style="color: Gray;">.</span><span style="color: #00008b;">$hex</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp;</span></li>
<li><span style="color: Green;">function</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">utf8_substr</span><span style="color: Olive;">(</span><span style="color: #00008b;">$str</span><span style="color: Gray;">, </span><span style="color: #00008b;">$len</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: #00008b;">$slen</span><span style="color: Gray;"> = </span><span style="color: Blue;">strlen</span><span style="color: Olive;">(</span><span style="color: #00008b;">$str</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">for</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">(</span><span style="color: #00008b;">$i</span><span style="color: Gray;"> = </span><span style="color: Maroon;">0</span><span style="color: Gray;">; </span><span style="color: #00008b;">$i</span><span style="color: Gray;"> &lt; </span><span style="color: #00008b;">$len</span><span style="color: Gray;"> &amp;&amp; </span><span style="color: #00008b;">$i</span><span style="color: Gray;"> &lt; </span><span style="color: #00008b;">$slen</span><span style="color: Gray;">; </span><span style="color: #00008b;">$i</span><span style="color: Gray;">++</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$temp_str</span><span style="color: Gray;"> = </span><span style="color: Blue;">substr</span><span style="color: Olive;">(</span><span style="color: #00008b;">$str</span><span style="color: Gray;">, </span><span style="color: Maroon;">0</span><span style="color: Gray;">, </span><span style="color: Maroon;">1</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">(</span><span style="color: Blue;">ord</span><span style="color: Olive;">(</span><span style="color: #00008b;">$temp_str</span><span style="color: Olive;">)</span><span style="color: Gray;"> &gt; </span><span style="color: Maroon;">127</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$i</span><span style="color: Gray;"> ++;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">(</span><span style="color: #00008b;">$i</span><span style="color: Gray;"> &lt; </span><span style="color: #00008b;">$len</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$new_str</span><span style="color: Olive;">[]</span><span style="color: Gray;"> = </span><span style="color: Blue;">substr</span><span style="color: Olive;">(</span><span style="color: #00008b;">$str</span><span style="color: Gray;">, </span><span style="color: Maroon;">0</span><span style="color: Gray;"> ,</span><span style="color: Maroon;">3</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$str</span><span style="color: Gray;"> = </span><span style="color: Blue;">substr</span><span style="color: Olive;">(</span><span style="color: #00008b;">$str</span><span style="color: Gray;">, </span><span style="color: Maroon;">3</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">else</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$new_str</span><span style="color: Olive;">[]</span><span style="color: Gray;"> = </span><span style="color: Blue;">substr</span><span style="color: Olive;">(</span><span style="color: #00008b;">$str</span><span style="color: Gray;">, </span><span style="color: Maroon;">0</span><span style="color: Gray;"> ,</span><span style="color: Maroon;">1</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$str</span><span style="color: Gray;"> = </span><span style="color: Blue;">substr</span><span style="color: Olive;">(</span><span style="color: #00008b;">$str</span><span style="color: Gray;">, </span><span style="color: Maroon;">1</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">return</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">join</span><span style="color: Olive;">(</span><span style="color: #8b0000;">''</span><span style="color: Gray;">, </span><span style="color: #00008b;">$new_str</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp;</span></li>
<li><span style="color: Green;">function</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">utf8_wordwrap</span><span style="color: Olive;">(</span><span style="color: #00008b;">$instr</span><span style="color: Gray;">, </span><span style="color: #00008b;">$width</span><span style="color: Gray;">, </span><span style="color: #00008b;">$s</span><span style="color: Gray;"> = </span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;wbr /&gt;</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: #00008b;">$outstr</span><span style="color: Gray;"> = </span><span style="color: #8b0000;">''</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">do</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$len</span><span style="color: Gray;"> = </span><span style="color: Blue;">strlen</span><span style="color: Olive;">(</span><span style="color: #00008b;">$instr</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">(</span><span style="color: Blue;">strlen</span><span style="color: Olive;">(</span><span style="color: #00008b;">$instr</span><span style="color: Olive;">)</span><span style="color: Gray;"> &gt; </span><span style="color: #00008b;">$width</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$tmpstr</span><span style="color: Gray;"> = </span><span style="color: Blue;">utf8_substr</span><span style="color: Olive;">(</span><span style="color: #00008b;">$instr</span><span style="color: Gray;">, </span><span style="color: #00008b;">$width</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$outstr</span><span style="color: Gray;"> .= </span><span style="color: #00008b;">$tmpstr</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$outstr</span><span style="color: Gray;"> .= </span><span style="color: #00008b;">$s</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">else</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$tmpstr</span><span style="color: Gray;"> = </span><span style="color: #00008b;">$instr</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$outstr</span><span style="color: Gray;"> .= </span><span style="color: #00008b;">$tmpstr</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$instr</span><span style="color: Gray;"> = </span><span style="color: Blue;">substr</span><span style="color: Olive;">(</span><span style="color: #00008b;">$instr</span><span style="color: Gray;">, </span><span style="color: Blue;">strlen</span><span style="color: Olive;">(</span><span style="color: #00008b;">$tmpstr</span><span style="color: Olive;">)</span><span style="color: Gray;">, </span><span style="color: #00008b;">$len</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Olive;">}</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">while</span><span style="color: Gray;"> </span><span style="color: Olive;">(</span><span style="color: Blue;">strlen</span><span style="color: Olive;">(</span><span style="color: #00008b;">$instr</span><span style="color: Olive;">)</span><span style="color: Gray;"> &gt; </span><span style="color: Maroon;">0</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">return</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">$outstr</span><span style="color: Gray;">;</span></li>
<li><span style="color: Olive;">}</span></li>
</ol></div>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F04%2Fwordpress-get-recent-comments-plugin-cjk%2F&amp;title=Get+Recent+Comments+%E4%B8%AD%E6%96%87%E6%94%B9%E8%89%AF%E7%89%88"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F04%2Fwordpress-get-recent-comments-plugin-cjk%2F&amp;title=Get+Recent+Comments+%E4%B8%AD%E6%96%87%E6%94%B9%E8%89%AF%E7%89%88"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F04%2Fwordpress-get-recent-comments-plugin-cjk%2F&amp;title=Get+Recent+Comments+%E4%B8%AD%E6%96%87%E6%94%B9%E8%89%AF%E7%89%88"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fblog.sunshow.net%2F2007%2F04%2Fwordpress-get-recent-comments-plugin-cjk%2F&amp;headline=Get+Recent+Comments+%E4%B8%AD%E6%96%87%E6%94%B9%E8%89%AF%E7%89%88"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Get+Recent+Comments+%E4%B8%AD%E6%96%87%E6%94%B9%E8%89%AF%E7%89%88&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F04%2Fwordpress-get-recent-comments-plugin-cjk%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Get+Recent+Comments+%E4%B8%AD%E6%96%87%E6%94%B9%E8%89%AF%E7%89%88&amp;u=http%3A%2F%2Fblog.sunshow.net%2F2007%2F04%2Fwordpress-get-recent-comments-plugin-cjk%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Get+Recent+Comments+%E4%B8%AD%E6%96%87%E6%94%B9%E8%89%AF%E7%89%88&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F04%2Fwordpress-get-recent-comments-plugin-cjk%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Get+Recent+Comments+%E4%B8%AD%E6%96%87%E6%94%B9%E8%89%AF%E7%89%88&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F04%2Fwordpress-get-recent-comments-plugin-cjk%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Get+Recent+Comments+%E4%B8%AD%E6%96%87%E6%94%B9%E8%89%AF%E7%89%88&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F04%2Fwordpress-get-recent-comments-plugin-cjk%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F04%2Fwordpress-get-recent-comments-plugin-cjk%2F&amp;title=Get+Recent+Comments+%E4%B8%AD%E6%96%87%E6%94%B9%E8%89%AF%E7%89%88&amp;summary=&amp;source="><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fblog.sunshow.net%2F2007%2F04%2Fwordpress-get-recent-comments-plugin-cjk%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fblog.sunshow.net%2F2007%2F04%2Fwordpress-get-recent-comments-plugin-cjk%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/reader/link?url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F04%2Fwordpress-get-recent-comments-plugin-cjk%2F&amp;title=Get+Recent+Comments+%E4%B8%AD%E6%96%87%E6%94%B9%E8%89%AF%E7%89%88"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>
	<div style="clear:both;"></div>标签：<a href="http://blog.sunshow.net/tag/cache/" title="cache" rel="tag">cache</a>, <a href="http://blog.sunshow.net/tag/comment/" title="comment" rel="tag">comment</a>, <a href="http://blog.sunshow.net/tag/plugin/" title="plugin" rel="tag">plugin</a>, <a href="http://blog.sunshow.net/tag/substr/" title="substr" rel="tag">substr</a>, <a href="http://blog.sunshow.net/tag/utf8/" title="utf8" rel="tag">utf8</a>, <a href="http://blog.sunshow.net/tag/wbr/" title="wbr" rel="tag">wbr</a>, <a href="http://blog.sunshow.net/tag/wordpress/" title="WordPress" rel="tag">WordPress</a>, <a href="http://blog.sunshow.net/tag/wordwrap/" title="wordwrap" rel="tag">wordwrap</a>, <a href="http://blog.sunshow.net/tag/%e4%b8%ad%e6%96%87/" title="中文" rel="tag">中文</a>, <a href="http://blog.sunshow.net/tag/%e8%af%84%e8%ae%ba/" title="评论" rel="tag">评论</a><br /><br />

	<div style="clear:both;"></div><strong>相关日志</strong>
	<ul class="st-related-posts">
	<li><a href="http://blog.sunshow.net/2009/05/apply-new-theme/" title="应用新主题 (2009-05-13)">应用新主题</a> (5)</li>
	<li><a href="http://blog.sunshow.net/2006/12/wp-forum/" title="WP-Forum (2006-12-15)">WP-Forum</a> (3)</li>
	<li><a href="http://blog.sunshow.net/2007/05/%e7%ae%97%e6%9c%af%e7%89%88anti-spam-image/" title="Anti Spam Image 算术版 (2007-05-01)">Anti Spam Image 算术版</a> (0)</li>
	<li><a href="http://blog.sunshow.net/2007/03/wordpress-runcode-plugin/" title="RunCode - plugin to show your code (2007-03-15)">RunCode - plugin to show your code</a> (32)</li>
	<li><a href="http://blog.sunshow.net/2006/07/java%e5%b7%a5%e4%bd%9c%e7%8e%af%e5%a2%83/" title="Java工作环境 (2006-07-19)">Java工作环境</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://blog.sunshow.net/2007/04/wordpress-get-recent-comments-plugin-cjk/feed/</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
		<item>
		<title>MySql连接问题</title>
		<link>http://blog.sunshow.net/2007/03/mysql-using-old-password/</link>
		<comments>http://blog.sunshow.net/2007/03/mysql-using-old-password/#comments</comments>
		<pubDate>Sun, 04 Mar 2007 12:50:55 +0000</pubDate>
		<dc:creator>Sunshow</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.sunshow.net/blog/archives/354.html</guid>
		<description><![CDATA[
由于最新版MYSQL服务器的密码算法与原有的不一样，导致用ODBC或PHP中连接不上。
所以安装好后，请用管理员帐号登录后执行如下命令：
use mysql
SET PASSWORD FOR 'yourname'@'localhost' = OLD_PASSWORD('yourpass');
这样就把密码改为原来的加密方式了。


	标签：mysql

	相关日志
	
	WP在高版本MySql下的乱码问题 (0)


]]></description>
			<content:encoded><![CDATA[<blockquote><p>
由于最新版MYSQL服务器的密码算法与原有的不一样，导致用ODBC或PHP中连接不上。<br />
所以安装好后，请用管理员帐号登录后执行如下命令：</p>
<p>use mysql<br />
SET PASSWORD FOR 'yourname'@'localhost' = OLD_PASSWORD('yourpass');</p>
<p>这样就把密码改为原来的加密方式了。
</p></blockquote>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F03%2Fmysql-using-old-password%2F&amp;title=MySql%E8%BF%9E%E6%8E%A5%E9%97%AE%E9%A2%98"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F03%2Fmysql-using-old-password%2F&amp;title=MySql%E8%BF%9E%E6%8E%A5%E9%97%AE%E9%A2%98"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F03%2Fmysql-using-old-password%2F&amp;title=MySql%E8%BF%9E%E6%8E%A5%E9%97%AE%E9%A2%98"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fblog.sunshow.net%2F2007%2F03%2Fmysql-using-old-password%2F&amp;headline=MySql%E8%BF%9E%E6%8E%A5%E9%97%AE%E9%A2%98"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=MySql%E8%BF%9E%E6%8E%A5%E9%97%AE%E9%A2%98&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F03%2Fmysql-using-old-password%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=MySql%E8%BF%9E%E6%8E%A5%E9%97%AE%E9%A2%98&amp;u=http%3A%2F%2Fblog.sunshow.net%2F2007%2F03%2Fmysql-using-old-password%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=MySql%E8%BF%9E%E6%8E%A5%E9%97%AE%E9%A2%98&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F03%2Fmysql-using-old-password%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=MySql%E8%BF%9E%E6%8E%A5%E9%97%AE%E9%A2%98&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F03%2Fmysql-using-old-password%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=MySql%E8%BF%9E%E6%8E%A5%E9%97%AE%E9%A2%98&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F03%2Fmysql-using-old-password%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F03%2Fmysql-using-old-password%2F&amp;title=MySql%E8%BF%9E%E6%8E%A5%E9%97%AE%E9%A2%98&amp;summary=&amp;source="><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fblog.sunshow.net%2F2007%2F03%2Fmysql-using-old-password%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fblog.sunshow.net%2F2007%2F03%2Fmysql-using-old-password%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/reader/link?url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F03%2Fmysql-using-old-password%2F&amp;title=MySql%E8%BF%9E%E6%8E%A5%E9%97%AE%E9%A2%98"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>
	<div style="clear:both;"></div>标签：<a href="http://blog.sunshow.net/tag/mysql/" title="mysql" rel="tag">mysql</a><br /><br />

	<div style="clear:both;"></div><strong>相关日志</strong>
	<ul class="st-related-posts">
	<li><a href="http://blog.sunshow.net/2006/08/garbled-problem-in-high-version-mysql/" title="WP在高版本MySql下的乱码问题 (2006-08-27)">WP在高版本MySql下的乱码问题</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://blog.sunshow.net/2007/03/mysql-using-old-password/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Multi RSS Reader Module v1.2</title>
		<link>http://blog.sunshow.net/2007/01/multi-rss-reader-module-v10/</link>
		<comments>http://blog.sunshow.net/2007/01/multi-rss-reader-module-v10/#comments</comments>
		<pubDate>Mon, 29 Jan 2007 13:32:00 +0000</pubDate>
		<dc:creator>Sunshow</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[Joomla]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[rss]]></category>

		<guid isPermaLink="false">http://www.sunshow.net/blog/archives/286.html</guid>
		<description><![CDATA[还是for joomla的
自带的rss只能显示单个feed
参考lilina利用 MagPieRSS 写了这个module
其实都是用的现成的东西
feed数目还是不要太多
就算有cache也还是会影响性能
Change Log
2007-02-05
+ 增加分页显示功能
2007-01-31
+ 增加控制摘要显示是否换行的选项
2007-01-30
* 只有当摘要超出限制长度时才显示...
+ 兼容新浪Blog以及新闻RSS的日期(sina输出0时区时间但标记了GMT+8)
下载： Multi RSS Reader Module v1.2
历史版本：
Multi RSS Reader Module v1.1.1

Multi RSS Reader Module v1.1
Multi RSS Reader Module v1.0
效果如图


	标签：feed, Joomla, module, rss

	相关日志
	
	Feedburner Feed Statistics Collector (0)
	改造了WP的Feed (0)
	Simple Tags导致的Feed输出问题 (0)
	301 Redirect (1)
	Hexun Bookmark Module v1.0 (1)


]]></description>
			<content:encoded><![CDATA[<p>还是for joomla的</p>
<p>自带的rss只能显示单个feed</p>
<p>参考lilina利用 <a href="http://magpierss.sourceforge.net/">MagPieRSS</a> 写了这个module</p>
<p>其实都是用的现成的东西</p>
<p>feed数目还是不要太多</p>
<p>就算有cache也还是会影响性能</p>
<p><em>Change Log</em><br />
<strong style="color: red">2007-02-05</strong><br />
+ 增加分页显示功能<br />
2007-01-31<br />
+ 增加控制摘要显示是否换行的选项<br />
2007-01-30<br />
* 只有当摘要超出限制长度时才显示...<br />
+ 兼容新浪Blog以及新闻RSS的日期(sina输出0时区时间但标记了GMT+8)</p>
<p>下载： <a href='http://www.sunshow.net/blog/wp-content/uploads/2007/02/mod_multirssreader_v1_2.zip' title='Multi RSS Reader Module v1.2'>Multi RSS Reader Module v1.2</a></p>
<p>历史版本：<br />
<a href="http://www.sunshow.net/blog/wp-content/uploads/2007/01/mod_multirssreader_v1_1_1.zip" title="Multi RSS Reader Module v1.1.1">Multi RSS Reader Module v1.1.1</a><br />
<a href="http://www.sunshow.net/blog/wp-content/uploads/2007/01/mod_multirssreader_v1_1.zip" title="Multi RSS Reader Module v1.1"></a><br />
<a href="http://www.sunshow.net/blog/wp-content/uploads/2007/01/mod_multirssreader_v1_1.zip" title="Multi RSS Reader Module v1.1">Multi RSS Reader Module v1.1</a><br />
<a href="http://www.sunshow.net/blog/wp-content/uploads/2007/01/mod_multirssreader_v1.zip" title="Multi RSS Reader Module v1.0">Multi RSS Reader Module v1.0</a></p>
<p>效果如图</p>
<p><a href='http://www.sunshow.net/blog/wp-content/uploads/2007/02/multirssreader1.jpg' title='Multi RSS Reader Module'><img src='http://www.sunshow.net/blog/wp-content/uploads/2007/02/multirssreader1.thumbnail.jpg' alt='Multi RSS Reader Module' /></a></p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F01%2Fmulti-rss-reader-module-v10%2F&amp;title=Multi+RSS+Reader+Module+v1.2"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F01%2Fmulti-rss-reader-module-v10%2F&amp;title=Multi+RSS+Reader+Module+v1.2"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F01%2Fmulti-rss-reader-module-v10%2F&amp;title=Multi+RSS+Reader+Module+v1.2"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fblog.sunshow.net%2F2007%2F01%2Fmulti-rss-reader-module-v10%2F&amp;headline=Multi+RSS+Reader+Module+v1.2"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Multi+RSS+Reader+Module+v1.2&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F01%2Fmulti-rss-reader-module-v10%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Multi+RSS+Reader+Module+v1.2&amp;u=http%3A%2F%2Fblog.sunshow.net%2F2007%2F01%2Fmulti-rss-reader-module-v10%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Multi+RSS+Reader+Module+v1.2&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F01%2Fmulti-rss-reader-module-v10%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Multi+RSS+Reader+Module+v1.2&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F01%2Fmulti-rss-reader-module-v10%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Multi+RSS+Reader+Module+v1.2&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F01%2Fmulti-rss-reader-module-v10%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F01%2Fmulti-rss-reader-module-v10%2F&amp;title=Multi+RSS+Reader+Module+v1.2&amp;summary=&amp;source="><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fblog.sunshow.net%2F2007%2F01%2Fmulti-rss-reader-module-v10%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fblog.sunshow.net%2F2007%2F01%2Fmulti-rss-reader-module-v10%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/reader/link?url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F01%2Fmulti-rss-reader-module-v10%2F&amp;title=Multi+RSS+Reader+Module+v1.2"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>
	<div style="clear:both;"></div>标签：<a href="http://blog.sunshow.net/tag/feed/" title="feed" rel="tag">feed</a>, <a href="http://blog.sunshow.net/tag/joomla/" title="Joomla" rel="tag">Joomla</a>, <a href="http://blog.sunshow.net/tag/module/" title="module" rel="tag">module</a>, <a href="http://blog.sunshow.net/tag/rss/" title="rss" rel="tag">rss</a><br /><br />

	<div style="clear:both;"></div><strong>相关日志</strong>
	<ul class="st-related-posts">
	<li><a href="http://blog.sunshow.net/2007/05/feedburner-feed-statistics-collector/" title="Feedburner Feed Statistics Collector (2007-05-05)">Feedburner Feed Statistics Collector</a> (0)</li>
	<li><a href="http://blog.sunshow.net/2006/07/rebuild-wordpress-feed/" title="改造了WP的Feed (2006-07-20)">改造了WP的Feed</a> (0)</li>
	<li><a href="http://blog.sunshow.net/2007/11/simple-tags%e5%af%bc%e8%87%b4%e7%9a%84feed%e8%be%93%e5%87%ba%e9%97%ae%e9%a2%98/" title="Simple Tags导致的Feed输出问题 (2007-11-10)">Simple Tags导致的Feed输出问题</a> (0)</li>
	<li><a href="http://blog.sunshow.net/2008/02/301-redirect/" title="301 Redirect (2008-02-16)">301 Redirect</a> (1)</li>
	<li><a href="http://blog.sunshow.net/2007/01/hexun-bookmark-module-v10/" title="Hexun Bookmark Module v1.0 (2007-01-25)">Hexun Bookmark Module v1.0</a> (1)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://blog.sunshow.net/2007/01/multi-rss-reader-module-v10/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Hexun Bookmark Module v1.0</title>
		<link>http://blog.sunshow.net/2007/01/hexun-bookmark-module-v10/</link>
		<comments>http://blog.sunshow.net/2007/01/hexun-bookmark-module-v10/#comments</comments>
		<pubDate>Thu, 25 Jan 2007 08:41:49 +0000</pubDate>
		<dc:creator>Sunshow</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[hexun]]></category>
		<category><![CDATA[Joomla]]></category>
		<category><![CDATA[module]]></category>

		<guid isPermaLink="false">http://www.sunshow.net/blog/archives/283.html</guid>
		<description><![CDATA[模仿着写了一个显示和讯网摘的module
主要是和讯自己的js调用显示出来格式不太一致
再有js调用对搜索引擎不友好
使用很简单
输入js调用的url就可以了
可以考虑加一些参数
joomla挺好玩的
效果演示
下载：Hexun Bookmark Module v1.0

	标签：hexun, Joomla, module

	相关日志
	
	Multi RSS Reader Module v1.2 (2)


]]></description>
			<content:encoded><![CDATA[<p>模仿着写了一个显示和讯网摘的module<br />
主要是和讯自己的js调用显示出来格式不太一致<br />
再有js调用对搜索引擎不友好</p>
<p>使用很简单<br />
输入js调用的url就可以了<br />
可以考虑加一些参数<br />
joomla挺好玩的</p>
<p><a href="http://www.sunshow.net" target="_blank">效果演示</a></p>
<p>下载：<a href="http://www.sunshow.net/blog/wp-content/uploads/2007/01/mod_bookmark_hexun_v1.zip" title="Hexun Bookmark Module v1.0">Hexun Bookmark Module v1.0</a></p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F01%2Fhexun-bookmark-module-v10%2F&amp;title=Hexun+Bookmark+Module+v1.0"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F01%2Fhexun-bookmark-module-v10%2F&amp;title=Hexun+Bookmark+Module+v1.0"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F01%2Fhexun-bookmark-module-v10%2F&amp;title=Hexun+Bookmark+Module+v1.0"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fblog.sunshow.net%2F2007%2F01%2Fhexun-bookmark-module-v10%2F&amp;headline=Hexun+Bookmark+Module+v1.0"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Hexun+Bookmark+Module+v1.0&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F01%2Fhexun-bookmark-module-v10%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Hexun+Bookmark+Module+v1.0&amp;u=http%3A%2F%2Fblog.sunshow.net%2F2007%2F01%2Fhexun-bookmark-module-v10%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Hexun+Bookmark+Module+v1.0&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F01%2Fhexun-bookmark-module-v10%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Hexun+Bookmark+Module+v1.0&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F01%2Fhexun-bookmark-module-v10%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Hexun+Bookmark+Module+v1.0&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F01%2Fhexun-bookmark-module-v10%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F01%2Fhexun-bookmark-module-v10%2F&amp;title=Hexun+Bookmark+Module+v1.0&amp;summary=&amp;source="><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fblog.sunshow.net%2F2007%2F01%2Fhexun-bookmark-module-v10%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fblog.sunshow.net%2F2007%2F01%2Fhexun-bookmark-module-v10%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/reader/link?url=http%3A%2F%2Fblog.sunshow.net%2F2007%2F01%2Fhexun-bookmark-module-v10%2F&amp;title=Hexun+Bookmark+Module+v1.0"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>
	<div style="clear:both;"></div>标签：<a href="http://blog.sunshow.net/tag/hexun/" title="hexun" rel="tag">hexun</a>, <a href="http://blog.sunshow.net/tag/joomla/" title="Joomla" rel="tag">Joomla</a>, <a href="http://blog.sunshow.net/tag/module/" title="module" rel="tag">module</a><br /><br />

	<div style="clear:both;"></div><strong>相关日志</strong>
	<ul class="st-related-posts">
	<li><a href="http://blog.sunshow.net/2007/01/multi-rss-reader-module-v10/" title="Multi RSS Reader Module v1.2 (2007-01-29)">Multi RSS Reader Module v1.2</a> (2)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://blog.sunshow.net/2007/01/hexun-bookmark-module-v10/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>删除字符串中多余的换行</title>
		<link>http://blog.sunshow.net/2006/07/remove-extra-blank-lines/</link>
		<comments>http://blog.sunshow.net/2006/07/remove-extra-blank-lines/#comments</comments>
		<pubDate>Sat, 22 Jul 2006 00:56:36 +0000</pubDate>
		<dc:creator>Sunshow</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[换行]]></category>
		<category><![CDATA[正则表达式]]></category>

		<guid isPermaLink="false">http://sunfee.net/blog/?p=62</guid>
		<description><![CDATA[function remove_blank_lines($content) {
	$result = explode("\n", $content);
	for ($i = 0; $i < count($result); $i ++) {
		if (trim($result[$i]) != "") {
			$new_content .= $result[$i];
			$new_content .= "\n";
		}
	}
	return $new_content;
}
很笨的方法，不是么~
写这个过程中还明白了单双引号的区别，真是惭愧。。。
底下大大给的高级方法：
function remove_blank_lines($content) {
	return preg_replace("/(\s*?\r?\n\s*?)+/","\n",$content);
}
配合这里学习正则表达式。

	标签：PHP, 换行, 正则表达式

	相关日志
	
	Documents (2)
	TestLink文件上传问题修复 (0)
	让WP不过滤上传文件名中的“.” (4)
	[转载]PHP+GD的安装 (2)
	IE和Firefox对换行的不同处理 (0)


]]></description>
			<content:encoded><![CDATA[<pre><code class="php">function remove_blank_lines($content) {
	$result = explode("\n", $content);
	for ($i = 0; $i < count($result); $i ++) {
		if (trim($result[$i]) != "") {
			$new_content .= $result[$i];
			$new_content .= "\n";
		}
	}
	return $new_content;
}</code></pre>
<p>很笨的方法，不是么~<br />
写这个过程中还明白了单双引号的区别，真是惭愧。。。</p>
<p>底下大大给的高级方法：</p>
<pre><code class="php">function remove_blank_lines($content) {
	return preg_replace("/(\s*?\r?\n\s*?)+/","\n",$content);
}</code></pre>
<p>配合<a href="http://www.sunshow.net/blog/wp-content/uploads/2006/09/jsgrpregexpsyntax.html">这里</a>学习正则表达式。</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fblog.sunshow.net%2F2006%2F07%2Fremove-extra-blank-lines%2F&amp;title=%E5%88%A0%E9%99%A4%E5%AD%97%E7%AC%A6%E4%B8%B2%E4%B8%AD%E5%A4%9A%E4%BD%99%E7%9A%84%E6%8D%A2%E8%A1%8C"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fblog.sunshow.net%2F2006%2F07%2Fremove-extra-blank-lines%2F&amp;title=%E5%88%A0%E9%99%A4%E5%AD%97%E7%AC%A6%E4%B8%B2%E4%B8%AD%E5%A4%9A%E4%BD%99%E7%9A%84%E6%8D%A2%E8%A1%8C"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.sunshow.net%2F2006%2F07%2Fremove-extra-blank-lines%2F&amp;title=%E5%88%A0%E9%99%A4%E5%AD%97%E7%AC%A6%E4%B8%B2%E4%B8%AD%E5%A4%9A%E4%BD%99%E7%9A%84%E6%8D%A2%E8%A1%8C"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fblog.sunshow.net%2F2006%2F07%2Fremove-extra-blank-lines%2F&amp;headline=%E5%88%A0%E9%99%A4%E5%AD%97%E7%AC%A6%E4%B8%B2%E4%B8%AD%E5%A4%9A%E4%BD%99%E7%9A%84%E6%8D%A2%E8%A1%8C"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=%E5%88%A0%E9%99%A4%E5%AD%97%E7%AC%A6%E4%B8%B2%E4%B8%AD%E5%A4%9A%E4%BD%99%E7%9A%84%E6%8D%A2%E8%A1%8C&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2006%2F07%2Fremove-extra-blank-lines%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=%E5%88%A0%E9%99%A4%E5%AD%97%E7%AC%A6%E4%B8%B2%E4%B8%AD%E5%A4%9A%E4%BD%99%E7%9A%84%E6%8D%A2%E8%A1%8C&amp;u=http%3A%2F%2Fblog.sunshow.net%2F2006%2F07%2Fremove-extra-blank-lines%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=%E5%88%A0%E9%99%A4%E5%AD%97%E7%AC%A6%E4%B8%B2%E4%B8%AD%E5%A4%9A%E4%BD%99%E7%9A%84%E6%8D%A2%E8%A1%8C&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2006%2F07%2Fremove-extra-blank-lines%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=%E5%88%A0%E9%99%A4%E5%AD%97%E7%AC%A6%E4%B8%B2%E4%B8%AD%E5%A4%9A%E4%BD%99%E7%9A%84%E6%8D%A2%E8%A1%8C&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2006%2F07%2Fremove-extra-blank-lines%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=%E5%88%A0%E9%99%A4%E5%AD%97%E7%AC%A6%E4%B8%B2%E4%B8%AD%E5%A4%9A%E4%BD%99%E7%9A%84%E6%8D%A2%E8%A1%8C&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2006%2F07%2Fremove-extra-blank-lines%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.sunshow.net%2F2006%2F07%2Fremove-extra-blank-lines%2F&amp;title=%E5%88%A0%E9%99%A4%E5%AD%97%E7%AC%A6%E4%B8%B2%E4%B8%AD%E5%A4%9A%E4%BD%99%E7%9A%84%E6%8D%A2%E8%A1%8C&amp;summary=&amp;source="><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fblog.sunshow.net%2F2006%2F07%2Fremove-extra-blank-lines%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fblog.sunshow.net%2F2006%2F07%2Fremove-extra-blank-lines%2F"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/reader/link?url=http%3A%2F%2Fblog.sunshow.net%2F2006%2F07%2Fremove-extra-blank-lines%2F&amp;title=%E5%88%A0%E9%99%A4%E5%AD%97%E7%AC%A6%E4%B8%B2%E4%B8%AD%E5%A4%9A%E4%BD%99%E7%9A%84%E6%8D%A2%E8%A1%8C"><img class="lightsocial_img" src="http://blog.sunshow.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>
	<div style="clear:both;"></div>标签：<a href="http://blog.sunshow.net/tag/php/" title="PHP" rel="tag">PHP</a>, <a href="http://blog.sunshow.net/tag/%e6%8d%a2%e8%a1%8c/" title="换行" rel="tag">换行</a>, <a href="http://blog.sunshow.net/tag/%e6%ad%a3%e5%88%99%e8%a1%a8%e8%be%be%e5%bc%8f/" title="正则表达式" rel="tag">正则表达式</a><br /><br />

	<div style="clear:both;"></div><strong>相关日志</strong>
	<ul class="st-related-posts">
	<li><a href="http://blog.sunshow.net/documents/" title="Documents (2006-09-09)">Documents</a> (2)</li>
	<li><a href="http://blog.sunshow.net/2009/02/testlink-upload-problem/" title="TestLink文件上传问题修复 (2009-02-05)">TestLink文件上传问题修复</a> (0)</li>
	<li><a href="http://blog.sunshow.net/2007/02/wordpress-do-not-filtrate-dot-of-upload-filename/" title="让WP不过滤上传文件名中的“.” (2007-02-12)">让WP不过滤上传文件名中的“.”</a> (4)</li>
	<li><a href="http://blog.sunshow.net/2006/08/%e8%bd%ac%e8%bd%bdphpgd%e7%9a%84%e5%ae%89%e8%a3%85/" title="[转载]PHP+GD的安装 (2006-08-26)">[转载]PHP+GD的安装</a> (2)</li>
	<li><a href="http://blog.sunshow.net/2009/01/ie-firefox-newline/" title="IE和Firefox对换行的不同处理 (2009-01-20)">IE和Firefox对换行的不同处理</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://blog.sunshow.net/2006/07/remove-extra-blank-lines/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
