<?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>haohtml&#039;s blog &#187; wordpress</title>
	<atom:link href="http://blog.haohtml.com/index.php/tag/wordpress/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.haohtml.com</link>
	<description>haohtml&#039;s life and works blog</description>
	<lastBuildDate>Sat, 31 Jul 2010 10:45:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>WP:模板手册</title>
		<link>http://blog.haohtml.com/index.php/archives/3140</link>
		<comments>http://blog.haohtml.com/index.php/archives/3140#comments</comments>
		<pubDate>Wed, 31 Mar 2010 04:52:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[个人收藏]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=3140</guid>
		<description><![CDATA[WordPress基本模板文件

访问者访问博客时，wordpress首先就会去找你模板目录里的这个文件：home.php，如果没有，就用index.php这个模板文件来显 示首页。

如果访问者点击你博客里名为（abc）的这个分类，url会连接到：http://yourwp/archives/category/abc，如 果这个分类的ID是6的话，wordpress首先就会去找这个模板文件：category-6.php，并用它来显示这个分类，如果category- 6.php不存在，wordpress就会去找category.php，如果也不存在，就会去找archive.php，如果还不存在，最终就会使用 index.php来显示这个分类。]]></description>
			<content:encoded><![CDATA[<h3>WordPress基本模板文件</h3>
<p>访问者访问博客时，wordpress首先就会去找你模板目录里的这个文件：home.php，如果没有，就用index.php这个模板文件来显 示首页。</p>
<p>如果访问者点击你博客里名为（abc）的这个分类，url会连接到：http://yourwp/archives/category/abc，如   果这个分类的ID是6的话，wordpress首先就会去找这个模板文件：category-6.php，并用它来显示这个分类，如果category-  6.php不存在，wordpress就会去找category.php，如果也不存在，就会去找archive.php，如果还不存在，最终就会使用  index.php来显示这个分类。</p>
<p>在一位国外bloger那里看到的一张图可以很好的解释WordPress的Themes的工作层次机制？<span id="more-3140"></span></p>
<p>home.php （显示首页）<br />
index.php （最基本、必不可少的文件，用来显示任何内容）<br />
single.php （显示单篇日志 ）<br />
页面名称.php （显示指定名称的页面）<br />
page.php （显示页面）<br />
分类ID.php （显示指定ID的分类）<br />
category.php （显示分类）<br />
archive.php （显示某一条件下的归档）<br />
archives.php （显示所有归档）<br />
author.php （显示作者资料）<br />
date.php （显示按日期归档的页）<br />
search.php （显示搜索页）<br />
searchform.php （显示搜索表单，与search.php不同的是不会用来直接处理用户的请求，而是在网页内被调用来显示表单元素 ）<br />
404.php （显示错误页）<br />
attachment.php （显示附件）<br />
comments.php （显示评论与表单元素）<br />
comments-popup.php （显示弹出窗口式评论）<br />
links.php （显示友情链接）<br />
sidebar.php （显示侧边栏）<br />
header.php （页眉）<br />
footer.php （页脚）<br />
functions.php  （功能、参数等配置文件，用来协助在后台对模板进行设置，也有部分插件需要此文件的支持。虽然也涉及输出显示部分，但和上面那些只要会CSS/XHTML 就可以编写的文件不一样，他更需要PHP编程技术）</p>
<h3>基本条件判断Tag</h3>
<ul>
<li><code><span>is_home()</span></code> : 是否为主页</li>
<li><code><span>is_single()</span></code> : 当前是否是一个具体文章全部内容页(Post)</li>
<li><code><span>is_page()</span></code> : 是否为内容页(Page)</li>
<li><code><span>is_category()</span></code> : 是否为Category/Archive页</li>
<li><code><span>is_tag()</span></code> : 是否为Tag存档页</li>
<li><code><span>is_date()</span></code> : 是否为指定日期存档页</li>
<li><code><span>is_year()</span></code> : 是否为指定年份存档页</li>
<li><code><span>is_month()</span></code> : 是否为指定月份存档页</li>
<li><code><span>is_day()</span></code> : 是否为指定日存档页</li>
<li><code><span>is_time()</span></code> : 是否为指定时间存档页</li>
<li><code><span>is_archive()</span></code> : 是否为存档页</li>
<li><code><span>is_search()</span></code> : 是否为搜索结果页</li>
<li><code><span>is_404()</span></code> : 是否为 “HTTP 404: Not Found” 错误页</li>
<li><code><span>is_paged()</span></code> : 主页/Category/Archive页是否以多页显示</li>
</ul>
<h3>Header部分常用到的PHP函数</h3>
<ul>
<li><strong>&lt;?php bloginfo(’name’); ?&gt; : 博客名称(Title)</strong></li>
<li><strong>&lt;?php bloginfo(’stylesheet_url’); ?&gt; :  CSS文件路径</strong></li>
<li><strong>&lt;?php bloginfo(’pingback_url’); ?&gt; : PingBack  Url</strong></li>
<li><strong>&lt;?php bloginfo(’template_url’); ?&gt; : 模板文件路径</strong></li>
<li><strong>&lt;?php bloginfo(’version’); ?&gt; : WordPress版本</strong></li>
<li><strong>&lt;?php bloginfo(’atom_url’); ?&gt; : Atom Url</strong></li>
<li><strong>&lt;?php bloginfo(’rss2_url’); ?&gt; : RSS 2.o Url</strong></li>
<li><strong>&lt;?php bloginfo(’url’); ?&gt; : 博客 Url</strong></li>
<li><strong>&lt;?php bloginfo(’html_type’); ?&gt; : 博客网页Html类型</strong></li>
<li><strong>&lt;?php bloginfo(’charset’); ?&gt; : 博客网页编码</strong></li>
<li><strong>&lt;?php bloginfo(’description’); ?&gt; : 博客描述</strong></li>
<li><strong>&lt;?php wp_title(); ?&gt; : 特定内容页(Post/Page)的标题</strong></li>
</ul>
<h3>模板常用的PHP函数及命令</h3>
<ul>
<li><strong>&lt;?php get_header(); ?&gt;</strong> : 调用Header模板</li>
<li><strong>&lt;?php get_sidebar(); ?&gt;</strong> : 调用Sidebar模板</li>
<li><strong>&lt;?php get_footer(); ?&gt;</strong> : 调用Footer模板</li>
<li><strong>&lt;?php the_content(); ?&gt;</strong> : 显示内容(Post/Page)</li>
<li><strong>&lt;?php if(have_posts()) : ?&gt;</strong> : 检查是否存在Post/Page</li>
<li><strong>&lt;?php while(have_posts()) : the_post(); ?&gt;</strong> :  如果存在Post/Page则予以显示</li>
<li><strong>&lt;?php endwhile; ?&gt;</strong> : While 结束</li>
<li><strong>&lt;?php endif; ?&gt;</strong> : If 结束</li>
<li><strong>&lt;?php the_time(’字符串’) ?&gt;</strong> :  显示时间，时间格式由“字符串”参数决定，具体参考<a href="http://php.net/date">PHP 手册</a></li>
<li><strong>&lt;?php comments_popup_link(); ?&gt;</strong> :  正文中的留言链接。如果使用 comments_popup_script() ，则留言会在新窗口中打开，反之，则在当前窗口打开</li>
<li><strong>&lt;?php the_title(); ?&gt;</strong> : 内容页(Post/Page)标题</li>
<li><strong>&lt;?php the_permalink() ?&gt;</strong> : 内容页(Post/Page) Url</li>
<li><strong>&lt;?php the_category(’, ‘) ?&gt;</strong> :  特定内容页(Post/Page)所属Category</li>
<li><strong>&lt;?php the_author(); ?&gt;</strong> : 作者</li>
<li><strong>&lt;?php the_ID(); ?&gt;</strong> : 特定内容页(Post/Page) ID</li>
<li><strong>&lt;?php edit_post_link(); ?&gt;</strong> :  如果用户已登录并具有权限，显示编辑链接</li>
<li><strong>&lt;?php get_links_list(); ?&gt;</strong> : 显示Blogroll中的链接</li>
<li><strong>&lt;?php comments_template(); ?&gt;</strong> : 调用留言/回复模板</li>
<li><strong>&lt;?php wp_list_pages(); ?&gt;</strong> : 显示Page列表</li>
<li><strong>&lt;?php wp_list_categories(); ?&gt;</strong> :  显示Categories列表</li>
<li><strong>&lt;?php next_post_link(’ %link ‘); ?&gt;</strong> : 下一篇文章链接</li>
<li><strong>&lt;?php previous_post_link(’%link’); ?&gt;</strong> :  上一篇文章链接</li>
<li><strong>&lt;?php get_calendar(); ?&gt;</strong> : 日历</li>
<li><strong>&lt;?php wp_get_archives() ?&gt;</strong> : 显示内容存档</li>
<li><strong>&lt;?php posts_nav_link(); ?&gt;</strong> : 导航，显示上一篇/下一篇文章链接</li>
<li><strong>&lt;?php include(TEMPLATEPATH . ‘/文件名’); ?&gt;</strong> :  嵌入其他文件，可为定制的模板或其他类型文件</li>
</ul>
<h3>与模板相关的其他函数</h3>
<ul>
<li><strong>&lt;?php _e(’Message’); ?&gt;</strong> : 输出相应信息</li>
<li><strong>&lt;?php wp_register(); ?&gt;</strong> : 显示注册链接</li>
<li><strong>&lt;?php wp_loginout(); ?&gt; </strong>: 显示登录/注销链接</li>
<li><strong>&lt;!–next page–&gt;</strong> : 将当前内容分页</li>
<li><strong>&lt;!–more–&gt;</strong> : 将当前内容截断，以不在主页/目录页显示全部内容</li>
<li><strong>&lt;?php timer_stop(1); ?&gt;</strong> : 网页加载时间(秒)</li>
<li><strong>&lt;?php echo get_num_queries(); ?&gt;</strong> : 网页加载查询量</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/index.php/archives/3140/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nginx下WordPress的永久链接实现</title>
		<link>http://blog.haohtml.com/index.php/archives/2685</link>
		<comments>http://blog.haohtml.com/index.php/archives/2685#comments</comments>
		<pubDate>Thu, 10 Dec 2009 01:48:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[服务器类]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/index.php/archives/2685</guid>
		<description><![CDATA[// //TODO 域名 if (location.hash) { document.domain=location.hash.substr(1); } //parent.qZEditor.callback(); function init(){ //获取编辑器面板ID var pid = frameElement.panelID; //获取编辑器面板对象 var panel = parent.QZFL.editor.editPanel.get(pid); panel["html"]._enableEditMode(); } // ]]&#62; 经过多番测试，终于在nginx下实现了rewrite的功能，WrodPress的永久链接终于生效了。 其实也是很简单的方法，修改nginx.conf文件，加入以下内容： location / { if (-f $request_filename/index.html){ rewrite (.*) $1/index.html break; } if (-f $request_filename/index.php){ rewrite (.*) $1/index.php; } if (!-f $request_filename){ rewrite (.*) /index.php; } } 重启nginx就可以了。 #killall [...]]]></description>
			<content:encoded><![CDATA[<p><!--     	.dump{} 	 --><script type="text/javascript">// <![CDATA[
// <![CDATA[</p>
<p>    	//TODO 域名
    	if (location.hash) {
	    	document.domain=location.hash.substr(1);
	    }</p>
<p>	    //parent.qZEditor.callback();
	   function init(){
	   		//获取编辑器面板ID
		    var pid = frameElement.panelID;</p>
<p>		    //获取编辑器面板对象
		    var panel = parent.QZFL.editor.editPanel.get(pid);</p>
<p>		    panel["html"]._enableEditMode();
	   }</p>
<p>// ]]&gt;</script></p>
<p>经过多番测试，终于在nginx下实现了<span>rewrite</span>的功能，WrodPress的永久<span>链接</span>终于生效了。</p>
<p>其实也是很简单的方法，修改nginx.conf文件，加入以下内容：</p>
<p><code>location  / {<br />
if (-f $request_filename/index.html){<br />
rewrite (.*) $1/index.html  break;<br />
}<br />
if (-f $request_filename/index.php){<br />
rewrite (.*)  $1/index.php;<br />
}<br />
if (!-f $request_filename){<br />
rewrite (.*)  /index.php;<br />
}<br />
}<br />
</code></p>
<p>重启nginx就可以了。</p>
<p>#killall nginx</p>
<p>#nginx</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/index.php/archives/2685/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress自动保存远程图片</title>
		<link>http://blog.haohtml.com/index.php/archives/415</link>
		<comments>http://blog.haohtml.com/index.php/archives/415#comments</comments>
		<pubDate>Thu, 25 Sep 2008 11:36:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[个人收藏]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://haohtml.com/wp/?p=415</guid>
		<description><![CDATA[给WordPress编辑器增加“自动保存远程图片”功能的方法：

自动保存远程图片修改方法如下:

1、在wp-admin/edit-form-advanced.php 第167行]]></description>
			<content:encoded><![CDATA[<p>此文章从网络上收集,本人未曾进行测试,不保证一定可以使用!</p>
<p>给WordPress编辑器增加“自动保存远程图片”功能的方法：</p>
<p>自动保存远程图片修改方法如下:</p>
<p>1、在wp-admin/edit-form-advanced.php 第167行<br />
<code></code><br />
后面加增加<br />
<code>Save pic:</p>
<input name="savepic" size="20" type="checkbox" value="checked" /></code><br />
2、修改 wp-admin/post.php，将第7行的<br />
<code>wp_reset_vars(array('action', 'safe_mode', 'withcomments', 'posts', 'content', 'edited_post_title', 'comment_error', 'profile', 'trackback_url', 'excerpt', 'showcomments', 'commentstart', 'commentend', 'commentorder'));<br />
</code><br />
改为<br />
<code>wp_reset_vars(array('action', 'safe_mode', 'withcomments', 'posts', 'content', 'edited_post_title', 'comment_error', 'profile', 'trackback_url', 'excerpt', 'showcomments', 'commentstart', 'commentend', 'commentorder', 'savepic')); </code><br />
3、在wp-admin/admin-functions.php 的开头增加<br />
<code>function open($file,$type=''){<br />
global $fromurl,$referer;<br />
$cachename=$file;<br />
if($type){<br />
$file=$fromurl.'/'.$type.'/'.$file;<br />
}else{<br />
$file=$fromurl.$file;<br />
}<br />
if($open=file($file)){<br />
$count=count($open);<br />
for($i=0;$i&lt;$count;$i++){<br />
$theget.=$open[$i];<br />
}<br />
}else{<br />
die('请求过多，超时，请刷新');<br />
}<br />
return $theget;<br />
} </code><br />
<span style="font-family: Verdana;">再在<br />
</span><code>$_POST['post_content'] = $_POST['content'];<br />
</code><br />
<span style="font-family: Verdana;">的后面添加以下代码：<br />
注意，上面的代码有两个地方有，要在最后那个的后面加<br />
</span><code>if($_POST['savepic']=="checked"){<br />
// begin to save pic;<br />
$img_array = array();<br />
$content1 = stripslashes($_POST['post_content']);<br />
if (get_magic_quotes_gpc()) $content1 = stripslashes($content1);<br />
//echo $content1;//文章内容嘿嘿开始处理了<br />
preg_match_all("/(src|SRC)=\"(http:\/\/(.+).(gif|jpg|jpeg|bmp|png))/isU",$content1,$img_array);//正则开始匹配所有的图片并放入数据<br />
$img_array = array_unique(dhtmlspecialchars($img_array[2])); </code><br />
<span style="font-family: Verdana;">完毕。</span></p>
<p>function cut($file,$from,$end){</p>
<p>$message=explode($from,$file);<br />
$message=explode($end,$message[1]);<br />
return $message[0];<br />
}<br />
function dhtmlspecialchars($string) {<br />
if(is_array($string)) {<br />
foreach($string as $key =&gt; $val) {<br />
$string[$key] = dhtmlspecialchars($val);<br />
}<br />
} else {<br />
$string = str_replace(’&amp;&#8217;, ‘&amp;’, $string);<br />
$string = str_replace(’”‘, ‘&#8221;’, $string);<br />
$string = str_replace(’&lt;&#8217;, &#8216;&lt;&#8217;, $string);<br />
$string = str_replace(&#8216;&gt;‘, ‘&gt;’, $string);<br />
$string = preg_replace(’/&amp;(#\d;)/’, ‘&amp;\1′, $string);<br />
}<br />
return $string;<br />
}<br />
function random($length) {<br />
$hash = ”;<br />
$chars = ‘ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz’;<br />
$max = strlen($chars) &#8211; 1;<br />
mt_srand((double)microtime() * 1000000);<br />
for($i = 0; $i &lt; $length; $i++) {<br />
$hash .= $chars[mt_rand(0, $max)];<br />
}<br />
return $hash;<br />
}</p>
<p>function mkdirs($dir)<br />
{<br />
if(!is_dir($dir))<br />
{<br />
mkdirs(dirname($dir));<br />
mkdir($dir);<br />
}<br />
return ;<br />
}</p>
<p>print_r($img_array);<br />
set_time_limit(0);</p>
<p>foreach ($img_array as $key =&gt; $value) {<br />
$get_file = file_get_contents($value);//开始获取图片了哦<br />
$filetime = time();<br />
$filepath = &#8220;../wp-content/uploads/pic2/&#8221;.date(&#8220;Y&#8221;,$filetime).&#8221;/&#8221;.date(&#8220;m&#8221;,$filetime).&#8221;/&#8221;;//图片保存的路径目录<br />
!is_dir($filepath) ? mkdirs($filepath) : null;<br />
$filename = date(&#8220;YmdHis&#8221;,$filetime).random(1).&#8217;.&#8217;.substr($value,-3,3);<br />
$fp = @fopen($filepath.$filename,&#8221;w&#8221;);<br />
@fwrite($fp,$get_file);<br />
fclose($fp);//完工，哈<br />
$content1 = preg_replace(&#8220;/&#8221;.addcslashes($value,&#8221;/&#8221;).&#8221;/isU&#8221;, &#8220;/wp-content/uploads/pic2/&#8221;.date(&#8220;Y&#8221;,$filetime).&#8221;/&#8221;.date(&#8220;m&#8221;,$filetime).&#8221;/&#8221;.$filename, $content1); //顺便替换一下文章里面的图片地址</p>
<p>}</p>
<p>$_POST['post_content'] = $content1;</p>
<p>// end save pic;<br />
}</p>
<p>现在，你再发表文章时，提交按钮旁边多了个选项</p>
<p>选中“save pic”，再点“发表”，即可保存远程图片了。</p>
<p>总结一下，要修改的文件有：</p>
<p>edit-form-advanced.php<br />
post.php<br />
admin-functions.php</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/index.php/archives/415/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PJBlog及LBS 到 WordPress 的新版数据转换程序</title>
		<link>http://blog.haohtml.com/index.php/archives/301</link>
		<comments>http://blog.haohtml.com/index.php/archives/301#comments</comments>
		<pubDate>Sat, 13 Sep 2008 16:54:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[个人收藏]]></category>
		<category><![CDATA[pjblog]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://haohtml.com/wp/?p=301</guid>
		<description><![CDATA[11月20日更新：加入了时间格式处理，保证在各种环境中获取的数据文本中的时间格式皆为 WP 的时间格式，以不至于转换数据造成时间丢失。 

---------------------------------------------------------------- 

挤时间做了个不同于以前那个的新版转换程序，这次采用的是 WordPress 自有备份格式做为媒介，并且这次将两个博客的转换代码整合在一起，通过对应的按钮分别导出。

使用方法如下：

将 LBS 或 PJBlog 的数据库改名为 blog.mdb
将 asp2wp.asp 以及 blog.mdb 上传到同一 ASP 空间目录下
运行程序根据需求点击相应的按钮获取 xml 格式的导出数据
进入已安装好的 WordPress 后台依次打开“管理”->“导入”->“WordPress”，根据提示导入之前获取的　xml 格式数据文件]]></description>
			<content:encoded><![CDATA[<div></div>
<p><span class="Apple-style-span" style="word-spacing: 0px; text-transform: none; color: #222222; text-indent: 0px; font-family: Verdana; white-space: normal; letter-spacing: normal; border-collapse: separate; text-align: left; webkit-text-size-adjust: auto; orphans: 2; widows: 2; webkit-border-horizontal-spacing: 0px; webkit-border-vertical-spacing: 0px; webkit-text-decorations-in-effect: none; webkit-text-stroke-width: 0;"></p>
<p style="margin: 20px auto; padding: 0px;"><strong style="margin: 0px; padding: 0px;">11月20日更新：</strong>加入了时间格式处理，保证在各种环境中获取的数据文本中的时间格式皆为 WP 的时间格式，以不至于转换数据造成时间丢失。 </p>
<p style="margin: 20px auto; padding: 0px;">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- </p>
<p style="margin: 20px auto; padding: 0px;">挤时间做了个不同于以前那个的新版转换程序，这次采用的是 WordPress 自有备份格式做为媒介，并且这次将两个博客的转换代码整合在一起，通过对应的按钮分别导出。</p>
<p style="margin: 20px auto; padding: 0px;">使用方法如下：</p>
<ol style="margin: 0px 0px 0px 48px; padding: 0px;">
<li style="margin: 0px; padding: 0px;">将 LBS 或 PJBlog 的数据库改名为 blog.mdb</li>
<li style="margin: 0px; padding: 0px;">将 asp2wp.asp 以及 blog.mdb 上传到同一 ASP 空间目录下</li>
<li style="margin: 0px; padding: 0px;">运行程序根据需求点击相应的按钮获取 xml 格式的导出数据</li>
<li style="margin: 0px; padding: 0px;">进入已安装好的 WordPress 后台依次打开“管理”-&gt;“导入”-&gt;“WordPress”，根据提示导入之前获取的　xml 格式数据文件</li>
</ol>
<p style="margin: 20px auto; padding: 0px;">提示：如果数据文件比较大，可以使用压缩包内所提供的 XML 分割软件分割成多个小尺寸数据文件依次导入。</p>
<p style="margin: 20px auto; padding: 0px;">OK，废话完了，给<a style="margin: 0px; color: #222222; text-decoration: none; padding: 0px;" href="http://www.voidpage.com/download/other/asp2wp.zip"><span style="margin: 0px; color: #3366ff; padding: 0px;">下载</span></a>。如果有什么问题或者建议请反馈给我，谢谢。</p>
<p> </p>
<p> </p>
<p></span></p>
<p style="margin: 20px auto; padding: 0px;">个人测试可以,但tag无法导入,请使用者注意这一点。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/index.php/archives/301/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress忘记密码解决办法</title>
		<link>http://blog.haohtml.com/index.php/archives/305</link>
		<comments>http://blog.haohtml.com/index.php/archives/305#comments</comments>
		<pubDate>Sat, 13 Sep 2008 16:37:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[个人收藏]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://haohtml.com/wp/?p=305</guid>
		<description><![CDATA[WorePress安装后都是自动给出密码的，我一直是自动登陆，所以一个月后居然把密码忘记了。WP使用的是MD5保存密码，所以密码不可逆。想到后台可以使用数据库，可以通过数据库找回密码，登陆phpmyadmin，然后如图，登陆后第一步是选择数据库.一般虚拟主机都带有phpmyadmin.]]></description>
			<content:encoded><![CDATA[<p class="storycontent">WorePress安装后都是自动给出密码的，我一直是自动登陆，所以一个月后居然把密码忘记了。WP使用的是MD5保存密码，所以密码不可逆。想到后台可以使用数据库，可以通过数据库找回密码，登陆phpmyadmin，然后如图，登陆后第一步是选择数据库.一般虚拟主机都带有phpmyadmin.</p>
<p class="storycontent"><img title="wordpress忘记密码" src="http://www.nnsg.cn/blogimage/zzr141.gif" alt=" " width="406" height="178" /></p>
<p><img title="wordpress忘记密码" src="http://www.nnsg.cn/blogimage/zzr142.gif" alt=" " width="406" height="178" /></p>
<p><img title="wordpress忘记密码" src="http://www.nnsg.cn/blogimage/zzr143.gif" alt=" " width="406" height="178" /></p>
<p>修改MD5密码为：”5d41402abc4b2a76b9719d911017c592″<br />
然后回到WordPress登陆页面，使用密码”hello” 登陆。</p>
<p>当然，还有其他的一些方法，我把觉得不错的方法也摘录下来以供参考。</p>
<p class="post-content"><strong>1. 通过PHP文件修改WordPress密码</strong></p>
<p class="post-content">新建一个pwd.php文件,并在其中加入:</p>
<p class="post-content"><span style="color: #008000;">echo md5(’<span style="color: #ff0000;">你的密码</span>’);</span></p>
<p class="post-content">上传到主机根目录下，执行http://你的域名/pwd.php,然后连到你的数据库执行.</p>
<p class="post-content"><span style="color: #008000;">update wp_users set user_pass=’<span style="color: #ff0000;">执行pwd.php显示的字符串</span>’ where user_login=’<span style="color: #ff0000;">admin</span>’;</span></p>
<p class="post-content">OK，现在可以用自己设定的密码进入管理员帐户了。</p>
<p class="post-content">2.<strong>通过 password-resetter 文件找回密码</strong>下载: <a title="password-resetter" href="http://www.info-life.cn/wp-content/password-resetter.zip"><span style="color: #222222;">password-resetter</span></a></p>
<p> </p>
<p class="post-content"><strong>使用方法</strong>:</p>
<div class="post-content">
<ol>
<li>将password-resetter.zip解压；</li>
<li>上传password-resetter.php到WordPress根目录 (注意: 这不是WordPress插件! )</li>
<li>运行<span style="color: #008000;">http://你的域名/password-resetter.php</span></li>
<li>在Set admin password:后面输入你要重置的管理员密码！然后点提交查询内容就可以了</li>
<li>记得找回密码后, 删除服务器上的password-resetter.php （不然会被他人利用)</li>
</ol>
</div>
<p>如果你还有其他不错的方法，请告诉我，我会继续完善本文。Thank you!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/index.php/archives/305/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
