<?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>Erick &#187; PHP</title>
	<atom:link href="http://blog.xiongchuan.org/category/tech/myphp/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.xiongchuan.org</link>
	<description>Even a great life is only a life until you make it.</description>
	<lastBuildDate>Thu, 10 Mar 2011 14:44:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
	
<!-- Start Of Script Generated By WP-PostViews Plus -->
<script type='text/javascript' src='http://blog.xiongchuan.org/wp-includes/js/jquery/jquery.js?ver=1.4.4'></script>
<script type="text/javascript">
/* <![CDATA[ */
/* ]]> */
</script>
<!-- End Of Script Generated By WP-PostViews Plus -->
	<item>
		<title>终于下了决心，把博客从国内移到国外了</title>
		<link>http://blog.xiongchuan.org/blog-move-to-us.html</link>
		<comments>http://blog.xiongchuan.org/blog-move-to-us.html#comments</comments>
		<pubDate>Sun, 16 Jan 2011 04:49:38 +0000</pubDate>
		<dc:creator>Erick</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[删除空行]]></category>
		<category><![CDATA[迁移]]></category>

		<guid isPermaLink="false">http://www.pigblog.net/?p=672</guid>
		<description><![CDATA[再一次使用了sudu的在线压缩文件，打包下载快一点儿，又忘了上回的教训，直接上传到bluehost的空间， 可想而知，头部有输出，这回连后台都进不了。 用sudu的文件打包在所有文件末尾都加了一个空行，导致php包含的时候，就有空白输出了。 还好，哥为了解决这个问题，之前写过一段代码，现在又有用了。 删除所有文件的末行的空白。 如果有想要下载的哥，请稳步到 PHP批量删除空行&#124;wordpress迁移的艰辛 Related PostsPHP批量删除空行&#124;wordpress迁移的艰辛]]></description>
			<content:encoded><![CDATA[<p>再一次使用了sudu的在线压缩文件，打包下载快一点儿，又忘了上回的教训，直接上传到bluehost的空间，<br />
可想而知，头部有输出，这回连后台都进不了。</p>
<blockquote><p>用sudu的文件打包在所有文件末尾都加了一个空行，导致php包含的时候，就有空白输出了。</p></blockquote>
<p>还好，哥为了解决这个问题，之前写过一段代码，现在又有用了。<br />
删除所有文件的末行的空白。</p>
<p>如果有想要下载的哥，请稳步到 <a href="http://www.pigblog.net/batch-delete-blank-lines.html" rel="external nofollow">PHP批量删除空行|wordpress迁移的艰辛</a></p>
<h4  class="entry-title">Related Posts</h4><ul class="related_post"><li><a href="http://blog.xiongchuan.org/batch-delete-blank-lines.html" title="PHP批量删除空行|wordpress迁移的艰辛">PHP批量删除空行|wordpress迁移的艰辛</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.xiongchuan.org/blog-move-to-us.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP替换全角符合出现乱码的解决办法</title>
		<link>http://blog.xiongchuan.org/convert-encoding.html</link>
		<comments>http://blog.xiongchuan.org/convert-encoding.html#comments</comments>
		<pubDate>Fri, 02 Jul 2010 01:00:57 +0000</pubDate>
		<dc:creator>Erick</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[乱码]]></category>

		<guid isPermaLink="false">http://www.pigblog.net/?p=637</guid>
		<description><![CDATA[str_replace,strtr,mb_ereg_replace,替换如&#8217;：&#8217;=>&#8217;:'，遇到&#8217;。。。好&#8217;,这时候会出现乱码，估计还很多其他样的情况，GOOGLE一下，在进行替换之前把内容转码到UTF-8,完了后再转换到GBK。 PS:这是在GBK编码的情况下，遇到的。 Most Commented Posts发一个dedeEIMS企业模板Guestbook博客终于恢复啦MySQL Can&#8217;t find messagefile,解决方法2010沉默几天武汉的这个六月搬家啦,上班不怕迟到了……About]]></description>
			<content:encoded><![CDATA[<p>str_replace,strtr,mb_ereg_replace,替换如&#8217;：&#8217;=>&#8217;:'，遇到&#8217;。。。好&#8217;,这时候会出现乱码，估计还很多其他样的情况，GOOGLE一下，在进行替换之前把内容转码到UTF-8,完了后再转换到GBK。<br />
PS:这是在GBK编码的情况下，遇到的。</p>
<h4  class="entry-title">Most Commented Posts</h4><ul class="related_post"><li><a href="http://blog.xiongchuan.org/an-enterprise-theme-for-dedeeims.html" title="发一个dedeEIMS企业模板">发一个dedeEIMS企业模板</a></li><li><a href="http://blog.xiongchuan.org/guestbook" title="Guestbook">Guestbook</a></li><li><a href="http://blog.xiongchuan.org/blog-recovery-again.html" title="博客终于恢复啦">博客终于恢复啦</a></li><li><a href="http://blog.xiongchuan.org/cant-find-messagefile-resolve.html" title="MySQL Can&#8217;t find messagefile,解决方法">MySQL Can&#8217;t find messagefile,解决方法</a></li><li><a href="http://blog.xiongchuan.org/2010-bad-day.html" title="2010沉默几天">2010沉默几天</a></li><li><a href="http://blog.xiongchuan.org/these-days-in-wuhan.html" title="武汉的这个六月">武汉的这个六月</a></li><li><a href="http://blog.xiongchuan.org/move-house.html" title="搬家啦,上班不怕迟到了……">搬家啦,上班不怕迟到了……</a></li><li><a href="http://blog.xiongchuan.org/about" title="About">About</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.xiongchuan.org/convert-encoding.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eclipse error:selection job title,已解决</title>
		<link>http://blog.xiongchuan.org/eclipse-erro-selection-job-title.html</link>
		<comments>http://blog.xiongchuan.org/eclipse-erro-selection-job-title.html#comments</comments>
		<pubDate>Mon, 15 Mar 2010 05:19:55 +0000</pubDate>
		<dc:creator>Erick</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[eclipse]]></category>

		<guid isPermaLink="false">http://www.pigblog.net/?p=615</guid>
		<description><![CDATA[今天在ZOL，在一台很破的机器上，在一个老的XP上用Eclipse，出现 An internal error occurred during: &#8220;Selection Job titile&#8221;. 解决办法是 使用http://download.eclipse.org/technology/dltk/updates/进行更新 其他方法可以参考 http://wiki.eclipse.org/PDT/Installation#Known_Problems Related PostsCentOS下eclipse支持GBK编码eclipse语言包，用迅雷批量下载Eclipse3.5 中文语言包 下载PDT:创建PHP项目出现“Creation of element failed”错误的解决方法]]></description>
			<content:encoded><![CDATA[<p>今天在ZOL，在一台很破的机器上，在一个老的XP上用Eclipse，出现</p>
<blockquote><p>An internal error occurred during: &#8220;Selection Job titile&#8221;.</p></blockquote>
<p>解决办法是<br />
使用http://download.eclipse.org/technology/dltk/updates/进行更新</p>
<p>其他方法可以参考</p>
<p>http://wiki.eclipse.org/PDT/Installation#Known_Problems</p>
<h4  class="entry-title">Related Posts</h4><ul class="related_post"><li><a href="http://blog.xiongchuan.org/centos-eclipse-gbk-encoding.html" title="CentOS下eclipse支持GBK编码">CentOS下eclipse支持GBK编码</a></li><li><a href="http://blog.xiongchuan.org/batch-download-eclipse-language-package.html" title="eclipse语言包，用迅雷批量下载">eclipse语言包，用迅雷批量下载</a></li><li><a href="http://blog.xiongchuan.org/eclipse-for-php-3-5-downoad.html" title="Eclipse3.5 中文语言包 下载">Eclipse3.5 中文语言包 下载</a></li><li><a href="http://blog.xiongchuan.org/pdt-create-php-project-creation-of-element-failed-resove.html" title="PDT:创建PHP项目出现“Creation of element failed”错误的解决方法">PDT:创建PHP项目出现“Creation of element failed”错误的解决方法</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.xiongchuan.org/eclipse-erro-selection-job-title.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHP批量删除空行&#124;wordpress迁移的艰辛</title>
		<link>http://blog.xiongchuan.org/batch-delete-blank-lines.html</link>
		<comments>http://blog.xiongchuan.org/batch-delete-blank-lines.html#comments</comments>
		<pubDate>Thu, 24 Dec 2009 08:48:03 +0000</pubDate>
		<dc:creator>Erick</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[删除空行]]></category>

		<guid isPermaLink="false">http://www.pigblog.net/?p=501</guid>
		<description><![CDATA[博客这些天一直处于死亡状态，昨天空间商帮忙把博客从浙江机房搬到河南机房了，暂时可以开通了。 Warning: Cannot modify header information &#8211; headers already sent by (output started at /*****/wp-includes/compat.php:230 头部有输出，昨天加班到比较晚，回家看《花木兰》，没去管博客，今天来公司，发现问题严重了，Google竟然抓取了页面 打开这些PHP的文件，发现下面全部都多了两行，就是php闭合标签之后多出了两个空行，造成在include 或是 require 后会有输出。 开始以为是只有几个文件是这样的，多打开几个发现，整个空间里面的php文件js,css,php都多出了两个空行，估计是华夏名网的在线文件管理器打包造成的。 因为本人对正则不熟悉，不过其实用正则替换倒不是太难，关键问题在于windows和linux下面的换行，回车符号的区别，费了不少时间研究。 虽然我知道windows下面是\r\n linux下面是\n 可是我用\r\n在windows系统上怎么也匹配不了，后来才发现我用的eclipse里面的我用的是Unix格式，换行就是\n，而不是\r\n，功夫不负苦心人哈，把代码贴出，也可以下载，有什么更好的方法，记得告诉我哈，各位！ //$path=__DIR__;//php 5.3 $path=dirname(__FILE__); function get_all_files($path,$pattern='/php$&#124;js$&#124;css$/i'){ $list = array(); foreach( glob( $path.DIRECTORY_SEPARATOR.'*') as $item ){ if( is_dir( $item ) ){ $list = array_merge( $list , get_all_files( $item,$pattern ) ); } else{ [...]]]></description>
			<content:encoded><![CDATA[<p>博客这些天一直处于死亡状态，昨天空间商帮忙把博客从浙江机房搬到河南机房了，暂时可以开通了。<br />
Warning: Cannot modify header information &#8211; headers already sent by (output started at /*****/wp-includes/compat.php:230<br />
头部有输出，昨天加班到比较晚，回家看《花木兰》，没去管博客，今天来公司，发现问题严重了，Google竟然抓取了页面<br />
<a href="http://www.pigblog.net/photos/photo/4210018847/pigblog.html" class="tt-flickr tt-flickr-Large" title="pigblog" rel="external nofollow"><img class="aligncenter" src="http://farm3.static.flickr.com/2556/4210018847_840f17f0ff_o.jpg" alt="pigblog" width="503" height="112" /></a><br />
打开这些PHP的文件，发现下面全部都多了两行，就是php闭合标签之后多出了两个空行，造成在include 或是 require 后会有输出。<br />
开始以为是只有几个文件是这样的，多打开几个发现，整个空间里面的php文件js,css,php都多出了两个空行，估计是华夏名网的在线文件管理器打包造成的。<br />
因为本人对正则不熟悉，不过其实用正则替换倒不是太难，关键问题在于windows和linux下面的换行，回车符号的区别，费了不少时间研究。<br />
虽然我知道windows下面是\r\n linux下面是\n  可是我用\r\n在windows系统上怎么也匹配不了，后来才发现我用的eclipse里面的我用的是Unix格式，换行就是\n，而不是\r\n，功夫不负苦心人哈，把代码贴出，也可以下载，有什么更好的方法，记得告诉我哈，各位！</p>
<pre name="code" class="php">
//$path=__DIR__;//php 5.3
$path=dirname(__FILE__);
function get_all_files($path,$pattern='/php$|js$|css$/i'){
    $list = array();
    foreach( glob( $path.DIRECTORY_SEPARATOR.'*') as $item ){
        if( is_dir( $item ) ){
         $list = array_merge( $list , get_all_files( $item,$pattern ) );
        }
        else{
            if(preg_match($pattern,$item)){
                $list[] = $item;
        	}
        }
    }
    return $list;
}
$list=get_all_files($path,'/php$/i');
foreach($list as $v){
$str=file_get_contents($v);
//var_dump($str);
$str=preg_replace("/\?>\s*$/i",'?>',$str);
//var_dump($str);
file_put_contents($v,$str);
}
header('Content-Type:text/html;Charset=utf-8');
echo "删除空白完成，Have a good time!";
echo "<a href="/index.php" >回首页</a>";
</pre>
<p><a href="http://www.pigblog.net/removespace.rar" rel="external nofollow">点这里下载文件</a><br />
解压后放到空间的根目录下面，会遍历所有子目录，并删除末尾的空行。</p>
<h4  class="entry-title">Related Posts</h4><ul class="related_post"><li><a href="http://blog.xiongchuan.org/blog-move-to-us.html" title="终于下了决心，把博客从国内移到国外了">终于下了决心，把博客从国内移到国外了</a></li><li><a href="http://blog.xiongchuan.org/blog-back.html" title="博客归来，更简洁了">博客归来，更简洁了</a></li><li><a href="http://blog.xiongchuan.org/flickr-photo-album-for-wordpress.html" title="Flickr Photo Album for WordPress|wp 相册">Flickr Photo Album for WordPress|wp 相册</a></li><li><a href="http://blog.xiongchuan.org/centos-5-3-apache2-mysql5-php-5-3-server.html" title="CentOS 5.3搭建Apache2.2.4+Mysql5.1.4+PHP5.3服务器">CentOS 5.3搭建Apache2.2.4+Mysql5.1.4+PHP5.3服务器</a></li><li><a href="http://blog.xiongchuan.org/warning-strtotime-function-strtotime-it-is-not-safe-to-rely-on-the-system-timezone-settings-resolve.html" title="Warning: strtotime() [function.strtotime]: It is not safe to rely on the system’s timezone settings. 解决方法">Warning: strtotime() [function.strtotime]: It is not safe to rely on the system’s timezone settings. 解决方法</a></li><li><a href="http://blog.xiongchuan.org/add-author-name-for-wordpress.html" title="给博客加个作者|wordpress作者函数">给博客加个作者|wordpress作者函数</a></li><li><a href="http://blog.xiongchuan.org/change-blog-program-to-wordpress.html" title="换博客啦">换博客啦</a></li><li><a href="http://blog.xiongchuan.org/php-braces-description.html" title="PHP的大括号，详解">PHP的大括号，详解</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.xiongchuan.org/batch-delete-blank-lines.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>MySQL Can&#8217;t find messagefile,解决方法</title>
		<link>http://blog.xiongchuan.org/cant-find-messagefile-resolve.html</link>
		<comments>http://blog.xiongchuan.org/cant-find-messagefile-resolve.html#comments</comments>
		<pubDate>Tue, 08 Dec 2009 14:02:00 +0000</pubDate>
		<dc:creator>Erick</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Windows相关]]></category>
		<category><![CDATA[xampp]]></category>

		<guid isPermaLink="false">http://www.pigblog.net/?p=491</guid>
		<description><![CDATA[今天新本本到了，晚上回家来安装xampp，APACHE还是一样好装，加入服务后，关闭80端口后，就启动了。 mysql竟然出问题，这还是第一次启动不了呢。1067错误，在windows的日志里查看，错误如下 Can&#8217;t find messagefile &#8216;\xampp\mysql\share\english\errmsg.sys&#8217; Can&#8217;t create test file \xampp\mysql\data\cherry-PC.lower-test 在WINDOWS XP下没有问题，因为我现在用的是VISTA，解决办法是找到xampp\mysql\bin\mysql.ini 把其中的\xampp\ 加上盘符，比如我的xampp装在E盘，改变后就是E:\xampp\ 这样就可以启动啦。 Related Postsmysql 查找重复记录 删除重复记录CentOS 5.3搭建Apache2.2.4+Mysql5.1.4+PHP5.3服务器MySQL备份Mysql ERROR 1045 (28000): Access denied for user &#8216;root&#8217;@'localhost&#8217;]]></description>
			<content:encoded><![CDATA[<p>今天新本本到了，晚上回家来安装xampp，APACHE还是一样好装，加入服务后，关闭80端口后，就启动了。<br />
mysql竟然出问题，这还是第一次启动不了呢。1067错误，在windows的日志里查看，错误如下</p>
<blockquote><p>Can&#8217;t find messagefile &#8216;\xampp\mysql\share\english\errmsg.sys&#8217;<br />
Can&#8217;t create test file \xampp\mysql\data\cherry-PC.lower-test</p></blockquote>
<p>在WINDOWS XP下没有问题，因为我现在用的是VISTA，解决办法是找到xampp\mysql\bin\mysql.ini<br />
把其中的\xampp\ 加上盘符，比如我的xampp装在E盘，改变后就是E:\xampp\<br />
这样就可以启动啦。</p>
<h4  class="entry-title">Related Posts</h4><ul class="related_post"><li><a href="http://blog.xiongchuan.org/mysql-find-and-delete-duplicate-records.html" title="mysql 查找重复记录 删除重复记录">mysql 查找重复记录 删除重复记录</a></li><li><a href="http://blog.xiongchuan.org/centos-5-3-apache2-mysql5-php-5-3-server.html" title="CentOS 5.3搭建Apache2.2.4+Mysql5.1.4+PHP5.3服务器">CentOS 5.3搭建Apache2.2.4+Mysql5.1.4+PHP5.3服务器</a></li><li><a href="http://blog.xiongchuan.org/mysql-backup.html" title="MySQL备份">MySQL备份</a></li><li><a href="http://blog.xiongchuan.org/mysql-error-1045-28000-access-denied-for-user-rootlocalhost.html" title="Mysql ERROR 1045 (28000): Access denied for user &#8216;root&#8217;@'localhost&#8217;">Mysql ERROR 1045 (28000): Access denied for user &#8216;root&#8217;@'localhost&#8217;</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.xiongchuan.org/cant-find-messagefile-resolve.html/feed</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>Flickr Photo Album for WordPress&#124;wp 相册</title>
		<link>http://blog.xiongchuan.org/flickr-photo-album-for-wordpress.html</link>
		<comments>http://blog.xiongchuan.org/flickr-photo-album-for-wordpress.html#comments</comments>
		<pubDate>Thu, 19 Nov 2009 14:32:32 +0000</pubDate>
		<dc:creator>Erick</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[flickr photo album]]></category>
		<category><![CDATA[插件]]></category>
		<category><![CDATA[相册]]></category>

		<guid isPermaLink="false">http://www.pigblog.net/?p=440</guid>
		<description><![CDATA[这几天突然想弄一个相册，放点图片。决定放Flickr上面，寻觅这样的插件，发现很多人说用Falbum，有很不错的评价，可惜我下载了最新版本，安装了却老有问题，要放弃时，偶然发现了这个插件，觉得挺好用的。Flickr Photo Album for WordPress，可以在sidebar提供照片，可以单独设置一个页面放相册。 讲一下安装吧： 1、当然下载这个zip的插件包，点这里下载 2、在wp后台，添加新插件，上传，激活插件 3、如果你想要单独的页面放相册，那么要开启rewrite，把原来的固定链接改成其它的样子 4、配置photo album 首先是授权，你必须要有一个Flickr的账号，这个自己解决吧，操作也明显。 相片集聚合 这个选项，设置路径，比如我设置的是photos/ 下面的按你的想法配置了。 5、为了在导航部分显示一个 相册 的链接我们要添加一个页面。先看效果图： 具体做法如下： A、左边menu的页面-&#62;添加新页面 B、标题处写上 相册 二字(当然你可以写其他的) C、点击右上角的 显示选项 在弹出菜单上 选择 页面别名选项 如下图 D、在下面 的页面别名处 填写 photos(和你在photo album的相片集处填写的路径一样) E、保存，完成。 这个时候，在你的博客页面，就可以看到相册的导航了，如果rewrite开启了的话，点击相册，就可以看到photo album上面的内容了，前提是你要有照片。效果： 但是你可能在你的博客里看到的效果和我的不一样，我是指没有排列好，这个是和具体模板有联系的。为了配合当前的模板，你需要修改这个文件。 /wp-content/plugins/tantan-flickr/templates/photoalbum-index.php 这个文件负责人布局，修改的话你要参照当前的模板，比如我现在用的是elegant-box这个主题，我就从这个目录下面找到/wp-content/themes/elegant-boxindex.php文件，参看布局，进行修改具体细节不想讲了，因为现在比较晚了，我要看火影了。针对我这个模板的photoalbum-index.php我放出来，如果有出现某种巧合你也用了这个模板，可以方便的把这个文件拿去覆盖啦。 getDisplayTemplate($photoTemplate)); // uncomment this line to print out the template being used // echo 'Photo [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">这几天突然想弄一个相册，放点图片。决定放Flickr上面，寻觅这样的插件，发现很多人说用Falbum，有很不错的评价，可惜我下载了最新版本，安装了却老有问题，要放弃时，偶然发现了这个插件，觉得挺好用的。<a href="http://tantannoodles.com/toolkit/photo-album/" target="_blank" rel="external nofollow">Flickr Photo Album for WordPress</a>，可以在sidebar提供照片，可以单独设置一个页面放相册。<br />
讲一下安装吧：<br />
1、当然下载这个zip的插件包，<a href="http://tantannoodles.com/toolkit/photo-album/" rel="external nofollow">点这里下载</a><br />
2、在wp后台，添加新插件，上传，激活插件<br />
3、如果你想要单独的页面放相册，那么要开启rewrite，把原来的固定链接改成其它的样子<br />
<a href="http://www.pigblog.net/wp-content/uploads/2009/11/4444.jpg" rel="external nofollow"><img class="aligncenter size-full wp-image-441" title="4444" src="http://www.pigblog.net/wp-content/uploads/2009/11/4444.jpg" alt="4444" width="570" height="309" /></a><br />
4、配置photo album<br />
首先是授权，你必须要有一个Flickr的账号，这个自己解决吧，操作也明显。<br />
相片集聚合 这个选项，设置路径，比如我设置的是photos/<br />
<a href="http://www.pigblog.net/wp-content/uploads/2009/11/5555.jpg" rel="external nofollow"><img class="aligncenter size-full wp-image-442" title="5555" src="http://www.pigblog.net/wp-content/uploads/2009/11/5555.jpg" alt="5555" width="596" height="101" /></a><br />
下面的按你的想法配置了。<br />
<span id="more-440"></span><br />
5、为了在导航部分显示一个 相册 的链接我们要添加一个页面。先看效果图：<br />
<a href="http://www.pigblog.net/wp-content/uploads/2009/11/6666.jpg" rel="external nofollow"><img class="aligncenter size-full wp-image-443" title="6666" src="http://www.pigblog.net/wp-content/uploads/2009/11/6666.jpg" alt="6666" width="128" height="41" /></a><br />
具体做法如下：<br />
A、左边menu的页面-&gt;添加新页面<br />
<a href="http://www.pigblog.net/wp-content/uploads/2009/11/77.jpg" rel="external nofollow"><img class="aligncenter size-full wp-image-444" title="77" src="http://www.pigblog.net/wp-content/uploads/2009/11/77.jpg" alt="77" width="143" height="74" /></a><br />
B、标题处写上 相册 二字(当然你可以写其他的)<br />
<a href="http://www.pigblog.net/wp-content/uploads/2009/11/888.jpg" rel="external nofollow"><img class="aligncenter size-full wp-image-446" title="888" src="http://www.pigblog.net/wp-content/uploads/2009/11/888.jpg" alt="888" width="394" height="107" /></a><br />
C、点击右上角的 显示选项 在弹出菜单上 选择 页面别名选项 如下图<br />
<a href="http://www.pigblog.net/wp-content/uploads/2009/11/99999.jpg" rel="external nofollow"><img class="aligncenter size-full wp-image-447" title="99999" src="http://www.pigblog.net/wp-content/uploads/2009/11/99999.jpg" alt="99999" width="970" height="154" /></a><br />
D、在下面 的页面别名处 填写 photos(和你在photo album的相片集处填写的路径一样)<br />
<a href="http://www.pigblog.net/wp-content/uploads/2009/11/111111111111.jpg" rel="external nofollow"><img class="aligncenter size-full wp-image-448" title="111111111111" src="http://www.pigblog.net/wp-content/uploads/2009/11/111111111111.jpg" alt="111111111111" width="212" height="152" /></a><br />
E、保存，完成。<br />
这个时候，在你的博客页面，就可以看到相册的导航了，如果rewrite开启了的话，点击相册，就可以看到photo album上面的内容了，前提是你要有照片。效果：<br />
<a href="http://www.pigblog.net/wp-content/uploads/2009/11/123456.jpg" rel="external nofollow"></a><a href="http://www.pigblog.net/wp-content/uploads/2009/11/123456.jpg" rel="external nofollow"><img class="size-full wp-image-455 aligncenter" title="123456" src="http://www.pigblog.net/wp-content/uploads/2009/11/123456.jpg" alt="123456" width="600" height="200" /></a></p>
<p>但是你可能在你的博客里看到的效果和我的不一样，我是指没有排列好，这个是和具体模板有联系的。为了配合当前的模板，你需要修改这个文件。<br />
/wp-content/plugins/tantan-flickr/templates/photoalbum-index.php<br />
这个文件负责人布局，修改的话你要参照当前的模板，比如我现在用的是elegant-box这个主题，我就从这个目录下面找到/wp-content/themes/elegant-boxindex.php文件，参看布局，进行修改具体细节不想讲了，因为现在比较晚了，我要看火影了。针对我这个模板的photoalbum-index.php我放出来，如果有出现某种巧合你也用了这个模板，可以方便的把这个文件拿去覆盖啦。</p>
<pre class="php" style="text-align: left;"><!--p /* Template Name: Photo Album If you want to customize the look and feel of your photo album, follow these steps.  You'll probably need a good understanding of HTML and CSS! 1. Copy this file into your current active theme's directory 2. Also copy all the files starting with "photoalbum-" into your theme's directory       * Alternatively, you could only copy just the "photoalbum-" file you want to customize into your current themes directory. 3. Customize the CSS in photoalbum-header.html to your liking. 4. That's it :) The main template files: - photoalbum-albums-index.html shows all your Flickr sets (aka albums) - photoalbum-album.html displays a highlight photo and all the photos for an album - photoalbum-photo.html displays one photo, along with next and previous photo links  Troubleshooting Tips: Not all WordPress themes are created equal, so default look and feel might look a little weird on your blog. Try looking at your theme's "index.php" and copy and paste any extra HTML or PHP into this file. $Revision: 128 $ $Date: 2008-04-24 00:16:32 -0400 (Thu, 24 Apr 2008) $ $Author: joetan54 $ */ global $TanTanFlickrPlugin; if (!is_object($TanTanFlickrPlugin)) wp_die('Flickr Photo Album plugin is not installed / activated!'); get_header(); // load the appropriate albums index, album's photos, or individual photo template. // $photoTemplate contains the template being used-->
<!--
<div id="content" class="narrowcolumn">-->
<div class="post"><!--p include($tpl = $TanTanFlickrPlugi-->getDisplayTemplate($photoTemplate));
// uncomment this line to print out the template being used
// echo 'Photo Album Template: '.$tpl;
?&gt;</div>

<!--p get_sidebar();-->
<div id="bottom"><!--p get_footer()--></div>
</pre>
<p>6、设置sidebar上面的图片<br />
这个很简单，在左边menu-&gt;小工具-&gt;把Flickr sidebar拖到右边 激活就OK了，你可以选择显示几张，如果你不选择随机显示相片的话，那么 第二栏的 标签对你来说很重要，因为显示的相片是根据你填写的标签，在flickr上你的相册里搜索的，所以呢，要怎么做，你知道了吧。<br />
<span style="color: #ff0000;">PS：如果你填写的标签，但是又没有显示出相片来，而你的相册确实是有相片的，并且也加了标签，这个的时候你要做的是，在photo album处刷新相集，清除cache这个选项选上，因为这个插件是有缓存的。</span></p>
<p>7、尽情享受吧！<br />
这是新手的天堂，高手闪开！</p>
<h4  class="entry-title">Related Posts</h4><ul class="related_post"><li><a href="http://blog.xiongchuan.org/blog-back.html" title="博客归来，更简洁了">博客归来，更简洁了</a></li><li><a href="http://blog.xiongchuan.org/batch-delete-blank-lines.html" title="PHP批量删除空行|wordpress迁移的艰辛">PHP批量删除空行|wordpress迁移的艰辛</a></li><li><a href="http://blog.xiongchuan.org/firefox-plugins-reboot-failed-resolve.html" title="Firefox安装插件后，重启无效的解决方法">Firefox安装插件后，重启无效的解决方法</a></li><li><a href="http://blog.xiongchuan.org/make-a-change-google-syntax-highlighter-for-wordpress.html" title="小小改动高亮插件Google Syntax Highlighter for WordPress">小小改动高亮插件Google Syntax Highlighter for WordPress</a></li><li><a href="http://blog.xiongchuan.org/add-author-name-for-wordpress.html" title="给博客加个作者|wordpress作者函数">给博客加个作者|wordpress作者函数</a></li><li><a href="http://blog.xiongchuan.org/change-blog-program-to-wordpress.html" title="换博客啦">换博客啦</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.xiongchuan.org/flickr-photo-album-for-wordpress.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CentOS 5.3搭建Apache2.2.4+Mysql5.1.4+PHP5.3服务器</title>
		<link>http://blog.xiongchuan.org/centos-5-3-apache2-mysql5-php-5-3-server.html</link>
		<comments>http://blog.xiongchuan.org/centos-5-3-apache2-mysql5-php-5-3-server.html#comments</comments>
		<pubDate>Sun, 08 Nov 2009 06:37:29 +0000</pubDate>
		<dc:creator>Erick</dc:creator>
				<category><![CDATA[Linux相关]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[服务器]]></category>

		<guid isPermaLink="false">http://www.pigblog.net/?p=381</guid>
		<description><![CDATA[留着，仅供自己下次安装用。都是在网上找的方法，只是给组合了下。 (温馨提示:如果你复制的安装过程，可能有类似这样的错误: configure: warning: /usr/local/php:: invalid host type &#8230; configure: error: can only configure for one host and one target at a time 我写的是&#8211;with-前面是两个-，但是wp经过了处理变成一个-了，所以你在记事本里面把-替换成两个-就行了 ) 1、使用 yum 程序安装所需开发包（以下为标准的 RPM 包名称） # yum install gcc gcc-c++ gcc-g77 flex bison autoconf automake bzip2-devel zlib-devel ncurses-devel libjpeg-devel libpng-devel libtiff-devel freetype-devel pam-devel # 这里我们将编译GD所必须的一些小软件比如libpng,libtiff,freetype,libjpeg等先用RPM的方式一并安装好，避免手动编译浪费时间，同时也能避免很多错误，这几个小软件的编译很麻烦。这几个小软件编译错误了，GD当然安装不了，php5的编译当然也没戏了。所以我们抓大放小，对这些小牛鬼蛇神采取快速简洁的方式进行安装。并且对服务器的性能也不能产生什么影响。 2、源码编译安装所需包 (Source) (1) GD2 # [...]]]></description>
			<content:encoded><![CDATA[<p>留着，仅供自己下次安装用。都是在网上找的方法，只是给组合了下。<br />
<span style="color: #ff0000;">(温馨提示:如果你复制的安装过程，可能有类似这样的错误:<br />
configure: warning: /usr/local/php:: invalid host type<br />
&#8230;<br />
configure: error: can only configure for one host and one target at a time<br />
<span style="color: #000000;">我写的是<span style="color: #ff0000;">&#8211;with-</span>前面是<span style="color: #ff0000;">两个-</span>，但是wp经过了处理变成<span style="color: #ff0000;">一个-</span>了，所以你在记事本里面把<span style="color: #ff0000;">-</span>替换成<span style="color: #ff0000;">两个-</span>就行了</span><br />
)</span></p>
<p>1、使用 yum 程序安装所需开发包（以下为标准的 RPM 包名称）<br />
# yum install gcc gcc-c++ gcc-g77 flex bison autoconf automake bzip2-devel zlib-devel ncurses-devel libjpeg-devel libpng-devel libtiff-devel freetype-devel pam-devel</p>
<p># 这里我们将编译GD所必须的一些小软件比如libpng,libtiff,freetype,libjpeg等先用RPM的方式一并安装好，避免手动编译浪费时间，同时也能避免很多错误，这几个小软件的编译很麻烦。这几个小软件编译错误了，GD当然安装不了，php5的编译当然也没戏了。所以我们抓大放小，对这些小牛鬼蛇神采取快速简洁的方式进行安装。并且对服务器的性能也不能产生什么影响。</p>
<p>2、源码编译安装所需包 (Source)<br />
(1) GD2<br />
# cd /usr/local/src<br />
# wget http://www.boutell.com/gd/http/gd-2.0.33.tar.gz<br />
# tar xzvf gd-2.0.33.tar.gz<br />
# cd gd-2.0.33<br />
# ./configure &#8211;prefix=/usr/local/gd2 &#8211;mandir=/usr/share/man //./configure 配置。<br />
# make //make 是用来编译的，它从 Makefile 中读取指令，然后编译。<br />
# make install //make install 是用来安装的，它也从 Makefile 中读取指令，安装到指定的位置。</p>
<p>(2) Apache 日志截断程序<br />
# cd /usr/local/src<br />
# wget http://cronolog.org/download/cronolog-1.6.2.tar.gz<br />
# tar xzvf cronolog-1.6.2.tar.gz<br />
# cd cronolog-1.6.2<br />
# ./configure &#8211;prefix=/usr/local/cronolog<br />
# make<br />
# make install</p>
<p>(3) libxml 库程序<br />
# cd /usr/local/src<br />
# wget http://ftp.gnome.org/pub/gnome/sources/libxml2/2.6/libxml2-2.6.26.tar.gz<br />
# tar zxvf libxml2-2.6.26.tar.gz<br />
# cd libxml2-2.6.26<br />
# ./configure &#8211;prefix=/usr/local/libxml2<br />
# make<br />
# make install<br />
<span id="more-381"></span><br />
接下来进入正题，建议安装顺序Mysql,Apache,PHP<br />
3、本来想尝试用编译源码的方法安装Mysql，可是官主的5.1.4没有，就下载了5.1.3的，可是尝试装到非默认路径怎么都是出错，没办法就用了5.1.4的按照解压包里的INSTALL的提示，一步步安装到了/usr/local/mysql，挺简单。<br />
# useradd mysql //添加 mysql 用户<br />
# cd /usr/local/mysql<br />
# ./bin/mysql_install_db &#8211;user=mysql<br />
# chown -R root:mysql . //设置权限，注意后面有一个 &#8220;.&#8221;<br />
# chown -R mysql /var/lib/mysql //设置 mysql 目录权限<br />
# chgrp -R mysql . //注意后面有一个 &#8220;.&#8221;<br />
# cp share/mysql/my-medium.cnf /etc/my.cnf<br />
# cp share/mysql/mysql.server /etc/rc.d/init.d/mysqld //开机自动启动 mysql。<br />
# chmod 755 /etc/rc.d/init.d/mysqld<br />
# chkconfig &#8211;add mysqld</p>
<p>4、编译安装 Apache2.24<br />
这个最简单了，基本不会有错误发生。<br />
# tar zxvf httpd-2.2.4.tar.gz<br />
# cd httpd-2.2.4<br />
依次安装apr和apr-util（这两个文件夹在httpd-2.2.4/srclib/里面，如下操作）</p>
<p># cd srclib/apr<br />
# ./configure &#8211;prefix=/usr/local/apr &#8211;enable-threads &#8211;enable-other-child USE=ipv6<br />
# make &amp;&amp; make install</p>
<p># cd ../apr-util<br />
# ./configure &#8211;prefix=/usr/local/apr-util &#8211;with-apr=/usr/local/apr/ &#8211;with-mysql=/usr/local/mysql<br />
# make &amp;&amp; make install</p>
<p>yum install openssl-devel.x86_64</p>
<p>cd /usr/local/src/httpd-2.2.4<br />
./configure &#8211;prefix=/usr/local/apache2 &#8211;enable-mods-shared=all &#8211;enable-deflate=shared &#8211;with-mysql=/usr/local/mysql &#8211;enable-cache &#8211;enable-file-cache &#8211;enable-mem-cache &#8211;enable-disk-cache &#8211;enable-static-support &#8211;enable-static-htpasswd &#8211;enable-static-htdigest &#8211;enable-static-rotatelogs &#8211;enable-static-logresolve &#8211;enable-static-htdbm &#8211;enable-static-ab &#8211;enable-static-checkgid &#8211;disable-cgid &#8211;disable-cgi &#8211;with-mpm=worker &#8211;with-apr=/usr/local/apr/ &#8211;with-apr-util=/usr/local/apr-util/ &#8211;enable-ssl &#8211;with-ssl=/usr/include/openssl</p>
<p># make<br />
# make install<br />
# echo &#8216;/usr/local/apache2/bin/apachectl start &#8216; &gt;&gt; /etc/rc.local //将 apachectl 的调用加入到你的系统启动文件中。</p>
<p>注解：<br />
./configure //配置源代码树<br />
&#8211;prefix=/usr/local/apache2 //体系无关文件的顶级安装目录PREFIX ，也就Apache的安装目录。<br />
&#8211;enable-module=so //打开 so 模块，so 模块是用来提 DSO 支持的 apache 核心模块<br />
&#8211;enable-mods-shared=all //编译全部的模板，对于不需要我们可以在httpd.conf去掉。<br />
&#8211;enable-cache //支持缓存<br />
&#8211;enable-file-cache //支持文件缓存<br />
&#8211;enable-mem-cache //支持记忆缓存<br />
&#8211;enable-disk-cache //支持磁盘缓存<br />
&#8211;enable-static-support //支持静态连接(默认为动态连接)<br />
&#8211;enable-static-htpasswd //使用静态连接编译 htpasswd &#8211; 管理用于基本认证的用户文件<br />
&#8211;enable-static-htdigest //使用静态连接编译 htdigest &#8211; 管理用于摘要认证的用户文件<br />
&#8211;enable-static-rotatelogs //使用静态连接编译 rotatelogs &#8211; 滚动 Apache 日志的管道日志程序<br />
&#8211;enable-static-logresolve //使用静态连接编译 logresolve &#8211; 解析 Apache 日志中的IP地址为主机名<br />
&#8211;enable-static-htdbm //使用静态连接编译 htdbm &#8211; 操作 DBM 密码数据库<br />
&#8211;enable-static-ab //使用静态连接编译 ab &#8211; Apache HTTP 服务器性能测试工具<br />
&#8211;enable-static-checkgid //使用静态连接编译 checkgid<br />
&#8211;disable-cgid //禁止用一个外部 CGI 守护进程执行CGI脚本<br />
&#8211;disable-cgi //禁止编译 CGI 版本的 PHP<br />
&#8211;with-mpm=worker // 让apache以worker方式运行<br />
&#8211;enable-ssl // 编译 ssl模块。</p>
<p>将apache设置成开机自启动:</p>
<p>在/etc/rc.d/rc.local文件中加入一行<br />
/usr/local/apache2/bin/apachectl start<br />
这样每次重新启动系统以后,apache也会随系统一起启动.</p>
<p>或者<br />
# cp /usr/local/apache2/bin/apachectl /etc/rc.d/init.d/httpd<br />
然后 vi /etc/rc.d/init.d/httpd 添加(#!/bin/sh下面)<br />
# chkconfig: 2345 10 90<br />
# description: Activates/Deactivates Apache Web Server<br />
最后，运行chkconfig把Apache添加到系统的启动服务组里面：<br />
# chkconfig &#8211;add httpd<br />
# chkconfig httpd on</p>
<p>5、编译安装php5.3<br />
下载curl 安装到/usr/loca/curl<br />
./configure &#8211;prefix=/usr/local/php &#8211;with-apxs2=/usr/local/apache2/bin/apxs &#8211;with-zlib-dir &#8211;with-bz2 &#8211;with-tiff-dir &#8211;with-libxml-dir=/usr/local/libxml2 &#8211;with-gd=/usr/local/gd2 &#8211;with-freetype-dir &#8211;with-jpeg-dir &#8211;with-png-dir &#8211;with-ttf &#8211;enable-mbstring &#8211;with-mysql=/usr/local/mysql &#8211;with-mysqli=/usr/local/mysql/bin/mysql_config &#8211;with-config-file-path=/etc &#8211;with-iconv &#8211;disable-ipv6 &#8211;enable-static &#8211;enable-maintainer-zts &#8211;enable-memory-limit &#8211;enable-zend-multibyte &#8211;enable-inline-optimization  &#8211;enable-sockets &#8211;enable-soap &#8211;with-openssl &#8211;with-curl=/usr/local/curl</p>
<p># make</p>
<p># make install</p>
<p># cp php.ini-recommended /etc/php.ini</p>
<p>6、整合apache 与php<br />
# vi /usr/local/apache2/conf/httpd.conf<br />
在最后一行加上：<br />
AddType application/x-httpd-php .php</p>
<p>查找：(设置 WEB 默认文件)<br />
DirectoryIndex index.html<br />
替换为：<br />
DirectoryIndex index.php index.html index.htm //在 WEB 目录不到默认文件，httpd 就会执行 /var/www/error/noindex.html</p>
<p>找到这一段：<br />
# AllowOverride controls what directives may be placed in .htaccess files.<br />
# It can be &#8220;All&#8221;, &#8220;None&#8221;, or any combination of the keywords:<br />
# Options FileInfo AuthConfig Limit<br />
#<br />
AllowOverride none</p>
<p>更改为AllowOverride all<br />
允许apache rewrite</p>
<p># 监听443端口,支持https连接<br />
取消注释 httpd.conf 中的 Include conf/extra/httpd-ssl.conf</p>
<p>保存httpd.conf，退出。</p>
<p># /usr/local/apache2/bin/apachectl restart //重启 Apache</p>
<p>以上就完成了，因为我用到的东西比较简单，所以这是最基本的安装了。</p>
<h4  class="entry-title">Related Posts</h4><ul class="related_post"><li><a href="http://blog.xiongchuan.org/mysql-error-1045-28000-access-denied-for-user-rootlocalhost.html" title="Mysql ERROR 1045 (28000): Access denied for user &#8216;root&#8217;@'localhost&#8217;">Mysql ERROR 1045 (28000): Access denied for user &#8216;root&#8217;@'localhost&#8217;</a></li><li><a href="http://blog.xiongchuan.org/batch-delete-blank-lines.html" title="PHP批量删除空行|wordpress迁移的艰辛">PHP批量删除空行|wordpress迁移的艰辛</a></li><li><a href="http://blog.xiongchuan.org/cant-find-messagefile-resolve.html" title="MySQL Can&#8217;t find messagefile,解决方法">MySQL Can&#8217;t find messagefile,解决方法</a></li><li><a href="http://blog.xiongchuan.org/mysql-find-and-delete-duplicate-records.html" title="mysql 查找重复记录 删除重复记录">mysql 查找重复记录 删除重复记录</a></li><li><a href="http://blog.xiongchuan.org/warning-strtotime-function-strtotime-it-is-not-safe-to-rely-on-the-system-timezone-settings-resolve.html" title="Warning: strtotime() [function.strtotime]: It is not safe to rely on the system’s timezone settings. 解决方法">Warning: strtotime() [function.strtotime]: It is not safe to rely on the system’s timezone settings. 解决方法</a></li><li><a href="http://blog.xiongchuan.org/centos-eclipse-gbk-encoding.html" title="CentOS下eclipse支持GBK编码">CentOS下eclipse支持GBK编码</a></li><li><a href="http://blog.xiongchuan.org/dual-system-boot-grub-resolve.html" title="双系统开机进入GRUB的解决办法">双系统开机进入GRUB的解决办法</a></li><li><a href="http://blog.xiongchuan.org/centos-5-3-filezilla-ftp.html" title="CentOS5.3安装Filezilla FTP软件">CentOS5.3安装Filezilla FTP软件</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.xiongchuan.org/centos-5-3-apache2-mysql5-php-5-3-server.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Warning: strtotime() [function.strtotime]: It is not safe to rely on the system’s timezone settings. 解决方法</title>
		<link>http://blog.xiongchuan.org/warning-strtotime-function-strtotime-it-is-not-safe-to-rely-on-the-system-timezone-settings-resolve.html</link>
		<comments>http://blog.xiongchuan.org/warning-strtotime-function-strtotime-it-is-not-safe-to-rely-on-the-system-timezone-settings-resolve.html#comments</comments>
		<pubDate>Tue, 27 Oct 2009 01:22:57 +0000</pubDate>
		<dc:creator>Erick</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.pigblog.net/?p=369</guid>
		<description><![CDATA[最终决定把PHP从5.2.11换成5.3，运行phpmyadmin的时候，就报错了。 Warning: strtotime() [function.strtotime]: It is not safe to rely on the system’s timezone settings. &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. 没有设置默认时区，编辑 /etc/php.ini 找到 ;date.timezone= 把分号去掉，并且在后面加上PRC，因为在中国 date.timezone=PRC 重启apache service httpd restart 前提是你把apache设置成服务 否则就是 apache_dir/bin/apache1 restart Related PostsPHP批量删除空行&#124;wordpress迁移的艰辛CentOS 5.3搭建Apache2.2.4+Mysql5.1.4+PHP5.3服务器PHP的大括号，详解]]></description>
			<content:encoded><![CDATA[<p>最终决定把PHP从5.2.11换成5.3，运行phpmyadmin的时候，就报错了。<br />
Warning: strtotime() [function.strtotime]: It is not safe to rely on the system’s timezone settings. &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..</p>
<p>没有设置默认时区，编辑<br />
/etc/php.ini<br />
找到<br />
;date.timezone=<br />
把分号去掉，并且在后面加上PRC，因为在中国<br />
date.timezone=PRC<br />
重启apache<br />
service httpd restart 前提是你把apache设置成服务 否则就是<br />
apache_dir/bin/apache1 restart</p>
<h4  class="entry-title">Related Posts</h4><ul class="related_post"><li><a href="http://blog.xiongchuan.org/batch-delete-blank-lines.html" title="PHP批量删除空行|wordpress迁移的艰辛">PHP批量删除空行|wordpress迁移的艰辛</a></li><li><a href="http://blog.xiongchuan.org/centos-5-3-apache2-mysql5-php-5-3-server.html" title="CentOS 5.3搭建Apache2.2.4+Mysql5.1.4+PHP5.3服务器">CentOS 5.3搭建Apache2.2.4+Mysql5.1.4+PHP5.3服务器</a></li><li><a href="http://blog.xiongchuan.org/php-braces-description.html" title="PHP的大括号，详解">PHP的大括号，详解</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.xiongchuan.org/warning-strtotime-function-strtotime-it-is-not-safe-to-rely-on-the-system-timezone-settings-resolve.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>小小改动高亮插件Google Syntax Highlighter for WordPress</title>
		<link>http://blog.xiongchuan.org/make-a-change-google-syntax-highlighter-for-wordpress.html</link>
		<comments>http://blog.xiongchuan.org/make-a-change-google-syntax-highlighter-for-wordpress.html#comments</comments>
		<pubDate>Wed, 14 Oct 2009 04:24:59 +0000</pubDate>
		<dc:creator>Erick</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[worpdress]]></category>
		<category><![CDATA[插件]]></category>
		<category><![CDATA[模板]]></category>

		<guid isPermaLink="false">http://www.pigblog.net/?p=347</guid>
		<description><![CDATA[Google Syntax Highlighter for WordPress 的代码注释部分和我用的这个模板cordobo-green-park-2有一点小问题，见下图 1、点击已经安装插件 2、编辑 Google Syntax Highlighter for WordPress 3、在右侧找插件文件：google-syntax-highlighter/Styles/SyntaxHighlighter.css，点击 4、在编辑区，把滚动条直接拉到最下面 5、修改倒数第三行 .dp-highlighter .comment, .dp-highlighter .comments { color: #008200;} 改为 .dp-highlighter .comment, .dp-highlighter .comments { color: #008200; border:none;} 6、更新文件 Related PostsFirefox安装插件后，重启无效的解决方法Flickr Photo Album for WordPress&#124;wp 相册发一个dedeEIMS企业模板]]></description>
			<content:encoded><![CDATA[<p>Google Syntax Highlighter for WordPress 的代码注释部分和我用的这个模板cordobo-green-park-2有一点小问题，见下图<br />
<a href="/wp-content/uploads/2009/10/99.jpg"><img src="/wp-content/uploads/2009/10/99.jpg" alt="99" title="99" width="356" height="72" class="aligncenter size-full wp-image-348" /></a></p>
<p>1、点击已经安装插件<br />
2、编辑 Google Syntax Highlighter for WordPress<br />
3、在右侧找插件文件：google-syntax-highlighter/Styles/SyntaxHighlighter.css，点击<br />
4、在编辑区，把滚动条直接拉到最下面<br />
5、修改倒数第三行  .dp-highlighter .comment, .dp-highlighter .comments { color: #008200;}<br />
    改为 .dp-highlighter .comment, .dp-highlighter .comments { color: #008200; border:none;}<br />
6、更新文件</p>
<h4  class="entry-title">Related Posts</h4><ul class="related_post"><li><a href="http://blog.xiongchuan.org/firefox-plugins-reboot-failed-resolve.html" title="Firefox安装插件后，重启无效的解决方法">Firefox安装插件后，重启无效的解决方法</a></li><li><a href="http://blog.xiongchuan.org/flickr-photo-album-for-wordpress.html" title="Flickr Photo Album for WordPress|wp 相册">Flickr Photo Album for WordPress|wp 相册</a></li><li><a href="http://blog.xiongchuan.org/an-enterprise-theme-for-dedeeims.html" title="发一个dedeEIMS企业模板">发一个dedeEIMS企业模板</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.xiongchuan.org/make-a-change-google-syntax-highlighter-for-wordpress.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wordpress代码高亮插件,Google Syntax Highlighter</title>
		<link>http://blog.xiongchuan.org/google-syntax-highlighter-for-wordpress-2.html</link>
		<comments>http://blog.xiongchuan.org/google-syntax-highlighter-for-wordpress-2.html#comments</comments>
		<pubDate>Wed, 14 Oct 2009 03:53:06 +0000</pubDate>
		<dc:creator>Erick</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[wordpe]]></category>

		<guid isPermaLink="false">http://www.pigblog.net/?p=337</guid>
		<description><![CDATA[之前安装的高亮插件是SyntaxHighlighter Plus，贴上代码后,$this-&#62;cache=1;这样代码都经过了htmlspecialchars的处理,变成了$this-&#62;cache=1;这样也就算了，一共替换三组经过htmlspecialchars转换的代码 str_replace('&#38;','&#38;amp;',$code); str_replace('&#38;lt;','amp;lt;',$code); str_replace('&#38;gt;','amp;gt;',$code); 这样处理后竟然是直接保存了，我修改一次文章，他就替换一次最终的结果是，看下面代码 $smarty-&#38;amp;amp;amp;amp;amp;gt;compile_dir='templates_c/'; $smarty-&#38;amp;amp;amp;amp;amp;gt;cache_dir='cache/'; $smarty-&#38;amp;amp;amp;amp;amp;gt;caching=1; $smarty-&#38;amp;amp;amp;amp;amp;gt;debugging=0; 真是失败！！！想想修改下代码继续用，可是因为以前听说过 Google Syntax Highlighter for WordPress 完全用JS实现的，这样就不会出现SyntaxHighlighter Plus修改我文章的现象了。 小试吧，初次感觉挺好，下载地址是：http://wordpress.org/extend/plugins/google-syntax-highlighter/ 使用方法 中间是代码了 class设置当前代码语言，支持： C++ (cpp, c, c++) C# (c#, c-sharp, csharp) CSS (css) Delphi (delphi, pascal) Java (java) Java Script (js, jscript, javascript) PHP (php) Python (py, python) Ruby (rb, ruby, rails, ror) Sql (sql) VB [...]]]></description>
			<content:encoded><![CDATA[<p>之前安装的高亮插件是SyntaxHighlighter Plus，贴上代码后,$this-&gt;cache=1;这样代码都经过了htmlspecialchars的处理,变成了$this-&gt;cache=1;这样也就算了，一共替换三组经过htmlspecialchars转换的代码</p>
<pre name="code" class="php">
str_replace('&amp;','&amp;amp;',$code);
str_replace('&amp;lt;','amp;lt;',$code);
str_replace('&amp;gt;','amp;gt;',$code);
</pre>
<p>这样处理后竟然是直接保存了，我修改一次文章，他就替换一次最终的结果是，看下面代码</p>
<pre name="code" class="php">
$smarty-&amp;amp;amp;amp;amp;amp;gt;compile_dir='templates_c/';
$smarty-&amp;amp;amp;amp;amp;amp;gt;cache_dir='cache/';
$smarty-&amp;amp;amp;amp;amp;amp;gt;caching=1;
$smarty-&amp;amp;amp;amp;amp;amp;gt;debugging=0;
</pre>
<p>真是失败！！！想想修改下代码继续用，可是因为以前听说过 <b>Google Syntax Highlighter for WordPress</b> 完全用JS实现的，这样就不会出现SyntaxHighlighter Plus修改我文章的现象了。<br />
<span id="more-337"></span><br />
小试吧，初次感觉挺好，下载地址是：http://wordpress.org/extend/plugins/google-syntax-highlighter/<br />
使用方法<br />
<code></p>
<pre name="code" class="php">
<pre name="code" class="php">中间是代码了</pre>
</pre>
<p>class设置当前代码语言，支持：<br />
C++ (cpp, c, c++)<br />
C# (c#, c-sharp, csharp)<br />
CSS (css)<br />
Delphi (delphi, pascal)<br />
Java (java)<br />
Java Script (js, jscript, javascript)<br />
PHP (php)<br />
Python (py, python)<br />
Ruby (rb, ruby, rails, ror)<br />
Sql (sql)<br />
VB (vb, vb.net)<br />
XML/HTML (xml, html, xhtml, xslt)<br />
</code></p>
<h4  class="entry-title">Most Commented Posts</h4><ul class="related_post"><li><a href="http://blog.xiongchuan.org/an-enterprise-theme-for-dedeeims.html" title="发一个dedeEIMS企业模板">发一个dedeEIMS企业模板</a></li><li><a href="http://blog.xiongchuan.org/guestbook" title="Guestbook">Guestbook</a></li><li><a href="http://blog.xiongchuan.org/blog-recovery-again.html" title="博客终于恢复啦">博客终于恢复啦</a></li><li><a href="http://blog.xiongchuan.org/cant-find-messagefile-resolve.html" title="MySQL Can&#8217;t find messagefile,解决方法">MySQL Can&#8217;t find messagefile,解决方法</a></li><li><a href="http://blog.xiongchuan.org/2010-bad-day.html" title="2010沉默几天">2010沉默几天</a></li><li><a href="http://blog.xiongchuan.org/these-days-in-wuhan.html" title="武汉的这个六月">武汉的这个六月</a></li><li><a href="http://blog.xiongchuan.org/move-house.html" title="搬家啦,上班不怕迟到了……">搬家啦,上班不怕迟到了……</a></li><li><a href="http://blog.xiongchuan.org/about" title="About">About</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.xiongchuan.org/google-syntax-highlighter-for-wordpress-2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

