<?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>久酷 &#187; 应用相关</title>
	<atom:link href="http://www.jiucool.com/cat/application/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jiucool.com</link>
	<description>Say That What I Can Say!</description>
	<lastBuildDate>Thu, 12 Jan 2012 23:09:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<atom:link rel='hub' href='http://www.jiucool.com/?pushpress=hub'/>
		<item>
		<title>Flex 与 WCF 通信</title>
		<link>http://www.jiucool.com/flex-with-wcf-communication/</link>
		<comments>http://www.jiucool.com/flex-with-wcf-communication/#comments</comments>
		<pubDate>Tue, 17 May 2011 12:24:50 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[应用相关]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[wcf]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/flex-with-wcf-communication/</guid>
		<description><![CDATA[最近呢,主要在研究啥呢,主要是在研究flex相关东东,这玩艺貌似历史蛮悠久,相比silverlight来说有不少现成的资源,界面效果也比较丰富,但是在研究过程中也遇到了不少问题. 

在flex 与wcf通信过程中,首先要注意以下几点:



跨域访问策略问题,貌似在最新的flex4.0以前版本中要求不是很严格,但在4.0中必须注意跨域问题.在socket通讯中也必须提供跨域权限认证,即使未跨域也要进行认证.

<span class="readmore"><a href="http://www.jiucool.com/flex-with-wcf-communication/" title="Flex 与 WCF 通信">Read More: 486 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p>最近呢,主要在研究啥呢,主要是在研究flex相关东东,这玩艺貌似历史蛮悠久,相比silverlight来说有不少现成的资源,界面效果也比较丰富,但是在研究过程中也遇到了不少问题. </p>
<p>在flex 与wcf通信过程中,首先要注意以下几点:</p>
<ol>
<li>跨域访问策略问题,貌似在最新的flex4.0以前版本中要求不是很严格,但在4.0中必须注意跨域问题.在socket通讯中也必须提供跨域权限认证,即使未跨域也要进行认证.</li>
<li>通过adobe flash builder 4.0 的数据访问功能添加wsdl源的时候,<a href="http://www.jiucool.com/tag/wcf/" class="st_tag internal_tag" rel="tag" title="Posts tagged with wcf">wcf</a> 配置文件中必须<b>将“endpoint ”节点中“binding”项设置为“basicHttpBinding”才可以,否则无法通讯.</b></li>
</ol>
<p><strong>建议开发工具选择 Adobe Flash Builer 4.0 (貌似现在刚出来了4.5,还未使用过). </strong></p>
<p>另外我在开发过程中遇到了一个小问题,调用wcf数据服务时都是异步调用的，异步调用出来的数据我绑定到DataGrid中,点击其中一行时触发相关事件进行数据查询，但第一次查询总是显示为NULL，必须进行第二次查询才会出来数据，不知何因，研究半天了，不知哪位高手能指教一二？？</p>
<p>No related posts.</p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2011. |
<a href="http://www.jiucool.com/flex-with-wcf-communication/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/flex-with-wcf-communication/#comments">5 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/flex/" rel="tag">flex</a>, <a href="http://www.jiucool.com/tag/wcf/" rel="tag">wcf</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/flex-with-wcf-communication/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Visual Firebug 可视化编辑页面CSS样式 chrome插件</title>
		<link>http://www.jiucool.com/visual-firebug-visual-editing-css-style-chrome-plug-in-page/</link>
		<comments>http://www.jiucool.com/visual-firebug-visual-editing-css-style-chrome-plug-in-page/#comments</comments>
		<pubDate>Wed, 22 Dec 2010 02:31:08 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[应用相关]]></category>
		<category><![CDATA[chrome插件]]></category>
		<category><![CDATA[visual firebug]]></category>
		<category><![CDATA[可视化编辑]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/visual-firebug-visual-editing-css-style-chrome-plug-in-page/</guid>
		<description><![CDATA[推荐一个chrome小插件

Visual Firebug是一个编辑在线页面CSS样式的chrome插件。它的产生是为了让一些不会使用firebug的视觉、交互、运营等同学能够快速、方便地修改在线页面。

对于习惯了火狐下firebug的同学来说,刚安装这个或许真有点不习惯,主要这款插件不直接跟源代码打交道,而是直观的、可视化对页面效果进行修改，所以对于初学者或者是一个非常不错的学习工具！对于firebug重度使用者来说,YOU CAN IGNORE IT.

<span class="readmore"><a href="http://www.jiucool.com/visual-firebug-visual-editing-css-style-chrome-plug-in-page/" title="Visual Firebug 可视化编辑页面CSS样式 chrome插件">Read More: 1280 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p>推荐一个chrome小插件</p>
<p>Visual Firebug是一个编辑在线页面CSS样式的chrome插件。它的产生是为了让一些不会使用firebug的视觉、交互、运营等同学能够快速、方便地修改在线页面。</p>
<p>对于习惯了火狐下firebug的同学来说,刚安装这个或许真有点不习惯,主要这款插件不直接跟源代码打交道,而是直观的、可视化对页面效果进行修改，所以对于初学者或者是一个非常不错的学习工具！对于firebug重度使用者来说,YOU CAN IGNORE IT.</p>
<p>当前版本：1.11</p>
<p>在线安装：<a href="https://chrome.google.com/extensions/detail/lomkpheldlbkkfiifcbfifipaofnmnkn?hl=zh-CN">google chrome extension</a></p>
<p>文档地址：<a href="http://www.zhouqicf.com/visual-firebug">http://www.zhouqicf.com/visual-firebug</a></p>
<p><b>一、使用方法</b></p>
<p><b>1</b><b>、开启插件</b></p>
<p><a href="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image001.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image001" border="0" alt="clip_image001" src="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image001_thumb.jpg" width="504" height="255" /></a></p>
<p>点击chrome工具条上的图标即可，待插件加载完毕后，会在当前Tab的页面内插入面板，并默认自动开启元素选择功能。</p>
<p><b>2</b><b>、选择节点</b></p>
<p><a href="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image002.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image002_thumb.jpg" width="604" height="302" /></a></p>
<p>当鼠标移入某个节点时，该节点周围会出现蓝色边框，直接点击该点击，则选中该节点作为待编辑节点。</p>
<p>在节点上右键鼠标则会唤出与该节点相关的其它节点列表，鼠标移出这些列表项后，页面上同样将以蓝色边框的方式显示该列表项所对应的节点，如果该节点没有相关的其他节点列表，则会显示”no-selector”，并且该提示会在2秒钟后消失。相关节点列表包括”Tag选择”及”Class选择”两种方 式，”Tag选择”将选中与该节点类型相同的节点，即如果当前节点为一个表格单元格（td），则会选中该单元格所在表格内的所有单元格；而”Class选择”将选中整个页面中拥有该class的所有节点。</p>
<p>按住ctrl键进行自由多选，选中某个元素后再次点击该元素将取消对此元素的选择，操作方式与window文件完全一致。</p>
<p>选择完节点后，在面板的左上方将出现当前待编辑节点的类型及数量。</p>
<p><b>3</b><b>、编辑节点样式</b></p>
<p><a href="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image003.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image003" border="0" alt="clip_image003" src="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image003_thumb.jpg" width="604" height="396" /></a></p>
<p>通过面板上的控件编辑节点样式。</p>
<p><b>4</b><b>、获取节点样式</b></p>
<p><a href="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image004.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image004_thumb.jpg" width="604" height="245" /></a></p>
<p>点击面板右上角”查看样式”按钮，下方将展开一个文本域，显示当前编辑节点的样式，在修改样式的过程中，该区域的样式将实时更新，并且该区域中的样式都进行了缩写处理。</p>
<p><b>5</b><b>、保存整页的修改结果</b></p>
<p><a href="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image005.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image005" border="0" alt="clip_image005" src="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image005_thumb.jpg" width="604" height="408" /></a></p>
<p>点击面板右上角”获取修改结果”按钮，页面的左上方将出现一个浮层，显示”loadding”，待加载完之后，该浮层将变大撑满整个屏幕，浮层内的 内容正是修改后的html代码，复制代码到一个文本文件，并另存为”xxx.html”即可。视觉、交互等同学对某些网页进行微调时，不必再打开 Photoshop、Axure等工具，直接打开本工具编辑即可，保存后即可丢给前端，前端看到效果后即可查看代码，在工具生成的代码的基础上code。</p>
<p><b>二、所有功能介绍</b></p>
<p><a href="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image006.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image006" border="0" alt="clip_image006" src="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image006_thumb.jpg" width="457" height="459" /></a></p>
<p><b>三、现有控件</b></p>
<ol>
<li>列表项符号 </li>
</ol>
<p><a href="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image007.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image007" border="0" alt="clip_image007" src="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image007_thumb.jpg" width="295" height="86" /></a></p>
<ol>
<li>字号 </li>
</ol>
<p><a href="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image008.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image008" border="0" alt="clip_image008" src="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image008_thumb.jpg" width="295" height="76" /></a></p>
<ol>
<li>行高 </li>
</ol>
<p><a href="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image009.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image009" border="0" alt="clip_image009" src="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image009_thumb.jpg" width="295" height="75" /></a></p>
<ol>
<li>字体 </li>
</ol>
<p><a href="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image010.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image010" border="0" alt="clip_image010" src="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image010_thumb.jpg" width="295" height="74" /></a></p>
<ol>
<li>字形，包括加粗、斜体、下划线 </li>
</ol>
<p><a href="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image011.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image011" border="0" alt="clip_image011" src="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image011_thumb.jpg" width="295" height="69" /></a></p>
<ol>
<li>字色 </li>
</ol>
<p><a href="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image012.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image012" border="0" alt="clip_image012" src="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image012_thumb.jpg" width="295" height="240" /></a></p>
<ol>
<li>对齐方式 </li>
</ol>
<p><a href="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image013.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image013" border="0" alt="clip_image013" src="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image013_thumb.jpg" width="295" height="74" /></a></p>
<ol>
<li>文字阴影 </li>
</ol>
<p><a href="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image014.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image014" border="0" alt="clip_image014" src="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image014_thumb.jpg" width="295" height="357" /></a></p>
<ol>
<li>背景色 </li>
</ol>
<p><a href="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image016.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image016" border="0" alt="clip_image016" src="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image016_thumb.jpg" width="295" height="240" /></a></p>
<ol>
<li>盒阴影 </li>
</ol>
<p><a href="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image018.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image018" border="0" alt="clip_image018" src="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image018_thumb.jpg" width="295" height="377" /></a></p>
<ol>
<li>边框，包括边框及圆角 </li>
</ol>
<p><a href="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image020.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image020" border="0" alt="clip_image020" src="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image020_thumb.jpg" width="289" height="604" /></a></p>
<ol>
<li>布局，包括内边距及外边距 </li>
</ol>
<p><a href="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image022.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image022" border="0" alt="clip_image022" src="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image022_thumb.jpg" width="295" height="332" /></a></p>
<ol>
<li>宽高，包括宽度及高度 </li>
</ol>
<p><a href="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image024.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image024" border="0" alt="clip_image024" src="http://pic.jiucool.com/2010/VisualFirebugCSSchrome_90F3/clip_image024_thumb.jpg" width="295" height="105" /></a></p>
<p><b>四、更新记录</b></p>
<p><b>1.1 </b><b>更新内容 （2010-12-17）</b></p>
<ol>
<li>按住ctrl进行元素的自由多选 </li>
<li>增加了一个显示当前节点的功能，mouseover的时候显示当前节点 </li>
<li>增加了about </li>
<li>修复了拖拽面板时仍在计算当前样式的bug </li>
<li>测试了多个网站，修正了样式影响 </li>
</ol>
<p>No related posts.</p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2010. |
<a href="http://www.jiucool.com/visual-firebug-visual-editing-css-style-chrome-plug-in-page/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/visual-firebug-visual-editing-css-style-chrome-plug-in-page/#comments">23 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/chrome%e6%8f%92%e4%bb%b6/" rel="tag">chrome插件</a>, <a href="http://www.jiucool.com/tag/visual-firebug/" rel="tag">visual firebug</a>, <a href="http://www.jiucool.com/tag/%e5%8f%af%e8%a7%86%e5%8c%96%e7%bc%96%e8%be%91/" rel="tag">可视化编辑</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/visual-firebug-visual-editing-css-style-chrome-plug-in-page/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>MYSQL数据库索引及约束条件问题</title>
		<link>http://www.jiucool.com/mysql-database-indexes-and-constraints-of-the-problem/</link>
		<comments>http://www.jiucool.com/mysql-database-indexes-and-constraints-of-the-problem/#comments</comments>
		<pubDate>Tue, 14 Dec 2010 01:53:59 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[应用相关]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/mysql-database-indexes-and-constraints-of-the-problem/</guid>
		<description><![CDATA[数据库索引好比是一本书前面的目录，能加快数据库的查询速度,是对数据库表中一列或多列的值进行排序的一种结构，使用索引可快速访问数据库表中的特定信息。

最近对某程序二次开发过程中却差点忽略了此问题,该程序数据库表中有了id主键,不过该程序又另外设置了唯一性约束条件,在创建表时发现他是这样的 UNIQUE KEY `XXX` (`user_id`,`xxx_id`),而mysql会自动将唯一键约束条件生成为索引! 类似于CREATE&#160;&#160; UNIQUE&#160;&#160; INDEX&#160;&#160; XXX&#160;&#160; ON&#160;&#160; TABLENAME（XXX,YYY）这个命令!

<span class="readmore"><a href="http://www.jiucool.com/mysql-database-indexes-and-constraints-of-the-problem/" title="MYSQL数据库索引及约束条件问题">Read More: 351 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p> 数据库索引好比是一本书前面的目录，能加快数据库的查询速度,是对数据库表中一列或多列的值进行排序的一种结构，使用索引可快速访问数据库表中的特定信息。</p>
<p>最近对某程序二次开发过程中却差点忽略了此问题,该程序数据库表中有了id主键,不过该程序又另外设置了唯一性约束条件,在创建表时发现他是这样的 UNIQUE KEY `XXX` (`user_id`,`xxx_id`),而mysql会自动将唯一键约束条件生成为索引! 类似于CREATE&#160;&#160; UNIQUE&#160;&#160; INDEX&#160;&#160; XXX&#160;&#160; ON&#160;&#160; TABLENAME（XXX,YYY）这个命令!</p>
<p>在调试程序写入的时候死活不出来,一个人折腾啊折腾,究其根源终于找到原因,问题居然在根上!其实有时候程序检查不出来问题的时候不妨检查一下数据库的约束条件! 特别是在对程序进行二次开发时,这个问题会遇到的比较多!</p>
<p>Related posts:<ol>
<li><a href='http://www.jiucool.com/wang-ye-bei-jing-yin-le-di-html-dai-ma/' rel='bookmark' title='网页背景音乐的HTML代码'>网页背景音乐的HTML代码</a></li>
<li><a href='http://www.jiucool.com/import-big-mysql/' rel='bookmark' title='直接导入大容量SQL数据库文件'>直接导入大容量SQL数据库文件</a></li>
<li><a href='http://www.jiucool.com/nginx-rewrite/' rel='bookmark' title='Nginx环境下supesite discuz wordpress静态化'>Nginx环境下supesite discuz wordpress静态化</a></li>
<li><a href='http://www.jiucool.com/yi-ge-wordpres-wen-zhang-fen-bu-cha-jian-wp-paged-comments/' rel='bookmark' title='一个wordpres文章分布插件WP Paged Comments'>一个wordpres文章分布插件WP Paged Comments</a></li>
<li><a href='http://www.jiucool.com/%e4%bf%ae%e6%94%b9mysql%e5%af%86%e7%a0%81%e7%9a%84%e6%96%b9%e6%b3%95/' rel='bookmark' title='修改mysql密码的方法'>修改mysql密码的方法</a></li>
<li><a href='http://www.jiucool.com/terror-mysql-bin-0000x-log-file/' rel='bookmark' title='恐怖的MySql-bin.0000X日志文件'>恐怖的MySql-bin.0000X日志文件</a></li>
<li><a href='http://www.jiucool.com/lv-se-di-php-huan-jing-bao-phpnow-145/' rel='bookmark' title='绿色的 PHP 环境包-PHPnow 1.4.5'>绿色的 PHP 环境包-PHPnow 1.4.5</a></li>
<li><a href='http://www.jiucool.com/php-mail-method-can-not-send-e-mail-to-some-email/' rel='bookmark' title='PHP mail()方法发送邮件部分邮箱无法收到邮件问题'>PHP mail()方法发送邮件部分邮箱无法收到邮件问题</a></li>
</ol></p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2010. |
<a href="http://www.jiucool.com/mysql-database-indexes-and-constraints-of-the-problem/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/mysql-database-indexes-and-constraints-of-the-problem/#comments">7 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/mysql/" rel="tag">mysql</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/mysql-database-indexes-and-constraints-of-the-problem/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>PHP mail()方法发送邮件部分邮箱无法收到邮件问题</title>
		<link>http://www.jiucool.com/php-mail-method-can-not-send-e-mail-to-some-email/</link>
		<comments>http://www.jiucool.com/php-mail-method-can-not-send-e-mail-to-some-email/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 18:00:06 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[应用相关]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[phpmailer]]></category>
		<category><![CDATA[php发送邮件]]></category>
		<category><![CDATA[sendemail]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/?p=8254</guid>
		<description><![CDATA[这两天写了个方法用到php mail()本以为php提供的这个方法非常简单、方便、易用，其实不然！刚开始感觉非常不错，网易邮箱、QQ邮箱、GMAIL邮箱常用的邮箱都可以收到，但经测试HOTMAIL、TOM、LIVE等邮箱是收不到此类邮件的！

经查询邮件发送的时候，一般都需要身份验证，而PHP自带的mail()无能为力，很脆弱啊！

所以说php的默认对邮件发送的支持并不是很好，很鸡肋！

嗯，刚刚研究了一下一款开源php邮件程序，用起来很方便

<span class="readmore"><a href="http://www.jiucool.com/php-mail-method-can-not-send-e-mail-to-some-email/" title="PHP mail()方法发送邮件部分邮箱无法收到邮件问题">Read More: 376 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p>这两天写了个方法用到php mail()本以为php提供的这个方法非常简单、方便、易用，其实不然！刚开始感觉非常不错，网易邮箱、QQ邮箱、GMAIL邮箱常用的邮箱都可以收到，但经测试HOTMAIL、TOM、LIVE等邮箱是收不到此类邮件的！</p>
<p>经查询邮件发送的时候，一般都需要身份验证，而PHP自带的mail()无能为力，很脆弱啊！</p>
<p>所以说php的默认对邮件发送的支持并不是很好，很鸡肋！</p>
<p>嗯，刚刚研究了一下一款开源php邮件程序，用起来很方便</p>
<p><a href="http://pic.jiucool.com/2010/08/PHPMailer.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="PHPMailer发送邮件" border="0" alt="PHPMailer发送邮件" src="http://pic.jiucool.com/2010/08/PHPMailer_thumb.jpg" width="535" height="403" /></a> </p>
<p>名称：<a href="http://www.jiucool.com/tag/phpmailer/" class="st_tag internal_tag" rel="tag" title="Posts tagged with phpmailer">phpmailer</a> </p>
<p>官方网址是：<a title="http://phpmailer.worxware.com/index.php?pg=phpmailer" href="http://phpmailer.worxware.com/index.php?pg=phpmailer" target="_blank">http://phpmailer.worxware.com/index.php?pg=phpmailer</a></p>
<p>使用的时候只要引入两个PHP类，然后自己写个方法就OK了，两个类很小，发送邮件速度很快！推荐之，嗯，今天忙得好晚了，下次有时间介绍下phpmailer的具体使用方法，很值得一用。</p>
<p>No related posts.</p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2010. |
<a href="http://www.jiucool.com/php-mail-method-can-not-send-e-mail-to-some-email/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/php-mail-method-can-not-send-e-mail-to-some-email/#comments">3 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/php-2/" rel="tag">php</a>, <a href="http://www.jiucool.com/tag/phpmailer/" rel="tag">phpmailer</a>, <a href="http://www.jiucool.com/tag/php%e5%8f%91%e9%80%81%e9%82%ae%e4%bb%b6/" rel="tag">php发送邮件</a>, <a href="http://www.jiucool.com/tag/sendemail/" rel="tag">sendemail</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/php-mail-method-can-not-send-e-mail-to-some-email/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>sitemapindex站点地图索引文件用法</title>
		<link>http://www.jiucool.com/sitemapindex-usage/</link>
		<comments>http://www.jiucool.com/sitemapindex-usage/#comments</comments>
		<pubDate>Fri, 25 Jun 2010 19:14:09 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[xml]]></category>
		<category><![CDATA[应用相关]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[sitemap]]></category>
		<category><![CDATA[sitemapindex]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/?p=7894</guid>
		<description><![CDATA[昨晚有朋友发来问我关于上篇文章（大型网站Sitemap生成方法）关于如何将child-sitemap写入到main-sitemap中，这里主要是用到的站点地图协议sitemapindex！

sitemapindex主要包括以下几个标记！



&#60;sitemapindex&#62; &#8211; 文件头尾的父标记。 





<span class="readmore"><a href="http://www.jiucool.com/sitemapindex-usage/" title="sitemapindex站点地图索引文件用法">Read More: 540 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p>昨晚有朋友发来问我关于上篇文章（<a href="http://www.jiucool.com/large-scale-web-site-sitemap-generate/">大型网站Sitemap生成方法</a>）关于如何将child-sitemap写入到main-sitemap中，这里主要是用到的站点地图协议sitemapindex！</p>
<p><a href="http://www.jiucool.com/sitemapindex-usage/">sitemapindex</a>主要包括以下几个标记！</p>
<ul>
<li><strong>&lt;<a href="http://www.jiucool.com/tag/sitemapindex/" class="st_tag internal_tag" rel="tag" title="Posts tagged with sitemapindex">sitemapindex</a>&gt;</strong> &#8211; 文件头尾的父标记。 </li>
</ul>
<ul>
<li><strong>&lt;<a href="http://www.jiucool.com/tag/sitemap/" class="st_tag internal_tag" rel="tag" title="Posts tagged with sitemap">sitemap</a>&gt;</strong> &#8211; 文件中列出的每个站点地图的父标记（<strong>&lt;sitemapindex&gt;</strong> 的子标记） </li>
</ul>
<ul>
<li><strong>&lt;loc&gt;</strong> &#8211; 站点地图的位置（<strong>&lt;sitemap&gt;</strong> 的子标记） </li>
</ul>
<ul>
<li><strong>&lt;lastmod&gt;</strong> &#8211; 站点地图 的上次修改日期（可选） </li>
</ul>
<p>示例如下：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;sitemapindex</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://www.sitemaps.org/schemas/sitemap/0.9&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;sitemap<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;loc<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>http://www.example.com/sitemap1.xml.gz<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/loc<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;lastmod<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>2010-12-01T18:28:17+00:00<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/lastmod<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/sitemap<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/sitemapindex<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>并且我发现了一个很有意思的现象，网易的网站地图居然连sitemap协议都不遵守，不知网易的开发人员是咋搞的！网易sitemap地址：http://news.163.com/sitemap.<a href="http://www.jiucool.com/tag/xml/" class="st_tag internal_tag" rel="tag" title="Posts tagged with xml">xml</a>，趁网易人员没看到此文章赶紧上图来看看：</p>
<p><img src="http://pic.jiucool.com/2010/06/网易sitemap.jpg" /> </p>
<p>从图中我们可以看到，网易开发人员居然直接将sitemap写成了urlset的子标签！将urlset 与sitemapindex子标签内容混合编写，这就相当于将向柴油机里加水，无论加多少也跑不起来啊！杯具！这种写法明显不符合协议规则！</p>
<p>No related posts.</p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2010. |
<a href="http://www.jiucool.com/sitemapindex-usage/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/sitemapindex-usage/#comments">9 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/java/" rel="tag">java</a>, <a href="http://www.jiucool.com/tag/sitemap/" rel="tag">sitemap</a>, <a href="http://www.jiucool.com/tag/sitemapindex/" rel="tag">sitemapindex</a>, <a href="http://www.jiucool.com/tag/xml/" rel="tag">xml</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/sitemapindex-usage/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>大型网站Sitemap生成方法</title>
		<link>http://www.jiucool.com/large-scale-web-site-sitemap-generate/</link>
		<comments>http://www.jiucool.com/large-scale-web-site-sitemap-generate/#comments</comments>
		<pubDate>Fri, 25 Jun 2010 13:13:30 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[xml]]></category>
		<category><![CDATA[应用相关]]></category>
		<category><![CDATA[dom4j]]></category>
		<category><![CDATA[google sitemap]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[sitemap]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/?p=7873</guid>
		<description><![CDATA[Sitemap对我们大家来说并不陌生，稍懂SEO的人就知其作用！我们最常用的WordPress也有相应的插件来实现，但我个人觉得我们最常用的Baidu Sitemap Generator、Google XML Sitemaps等等插件生成机制并不是很是很完善！

原因为何？请看下文分解：

因为搜索引擎对sitemap其中的网址数目抓取有一定的限制，记得最早的时候，google对于一个sitemap只可以抓取1000个网址,后来才大幅增加！不管一个sitemap可抓取数量现在具体增加到了多少，但肯定数目的多少对搜索引擎的抓取肯定有影响，既然有影响我们为何不做得更完美一些呢！

<span class="readmore"><a href="http://www.jiucool.com/large-scale-web-site-sitemap-generate/" title="大型网站Sitemap生成方法">Read More: 1002 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p>Sitemap对我们大家来说并不陌生，稍懂SEO的人就知其作用！我们最常用的WordPress也有相应的插件来实现，但我个人觉得我们最常用的<strong>Baidu Sitemap Generator、Google <a href="http://www.jiucool.com/tag/xml/" class="st_tag internal_tag" rel="tag" title="Posts tagged with xml">XML</a> Sitemaps</strong>等等插件生成机制并不是很是很完善！</p>
<p><strong>原因为何？请看下文分解：</strong></p>
<p>因为搜索引擎对<a href="http://www.jiucool.com/large-scale-web-site-sitemap-generate/">sitemap</a>其中的网址数目抓取有一定的限制，记得最早的时候，google对于一个sitemap只可以抓取1000个网址,后来才大幅增加！不管一个sitemap可抓取数量现在具体增加到了多少，但肯定数目的多少对搜索引擎的抓取肯定有影响，既然有影响我们为何不做得更完美一些呢！</p>
<p>并且如果sitemap如果是单个文件的话，量级太大，再加服务器速度太慢，估计没有几分钟是显示不出来的！现在google也将速度指标加入PR里，单个页面不宜过大！</p>
<p><strong>Baidu Sitemap Generator、Google XML Sitemaps</strong>等插件全部是采用单文件形式，并且生成机制也有待完善，如果你WP网站文章很少没问题，但当用WP建大型网站时文章数很多，各种问题就随之而来了！！</p>
<p>所以<a href="http://www.jiucool.com/large-scale-web-site-sitemap-generate/">多sitemap机制</a>更有利于搜索引擎快速、顺利的抓取！</p>
<p><strong>何为多sitemap机制？</strong> 首先我们生成一个主sitemap（我们用main-sitemap来称呼吧）文件，此文件为sitemapindex类型，其中存放子sitemap文件（我们称之为child-sitemap吧，下同）！child-sitemap文件只用来存放具体文章item. 这里我们假定每个child-sitemap存放网址数为5000个！</p>
<p><strong>我画了一个流程图，我的思路是这样的：</strong></p>
<p><a href="http://pic.jiucool.com/2010/06/jiucoolsitemap1.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="jiucool关于sitemap生成思路" border="0" alt="jiucool关于sitemap生成思路" src="http://pic.jiucool.com/2010/06/jiucoolsitemap_thumb1.jpg" width="554" height="409" /></a> </p>
<p>这样我们只需提交一个main-sitemap就可以了，搜索引擎就会通过main-sitemap找到其他所有的child-sitemap文件，并索引之！另外还写了一个方法，就是初始化全站sitemap生成，还一个是删除文章时item条目删除！ 这一起加起来就构成了一个完整的sitemap更新机制！ </p>
<p>嗯，这就是今天的工作，从流程到实现，搞定！</p>
<p>如果大家还有更好的方法，欢迎拍砖！</p>
<p>PS. 之前有朋友说每次不必那么麻烦，查找 插入删除item，何不直接删除文件重建？？这样逻辑更简单！ 简单是简单，但是对于大型网站来说，文章数至少是几万级别以上的，如果每更新一篇文章，如果重建一次，服务器肯定承受不住！所以采取逻辑复杂一些，服务器消耗更少！</p>
<p>No related posts.</p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2010. |
<a href="http://www.jiucool.com/large-scale-web-site-sitemap-generate/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/large-scale-web-site-sitemap-generate/#comments">20 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/dom4j/" rel="tag">dom4j</a>, <a href="http://www.jiucool.com/tag/google-sitemap/" rel="tag">google sitemap</a>, <a href="http://www.jiucool.com/tag/java/" rel="tag">java</a>, <a href="http://www.jiucool.com/tag/sitemap/" rel="tag">sitemap</a>, <a href="http://www.jiucool.com/tag/xml/" rel="tag">xml</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/large-scale-web-site-sitemap-generate/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>dom4j为生成XML的文件添加xmlns属性</title>
		<link>http://www.jiucool.com/dom4j-xml-xmlns/</link>
		<comments>http://www.jiucool.com/dom4j-xml-xmlns/#comments</comments>
		<pubDate>Fri, 25 Jun 2010 09:42:13 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[xml]]></category>
		<category><![CDATA[应用相关]]></category>
		<category><![CDATA[dom4j]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[xmlns]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/?p=7864</guid>
		<description><![CDATA[今天在开发sitemap地图时遇到一个小小问题，就是xmlns属性的添加！我们知道sitmap 根结点有一些属性！大体如下：





1

2

3

<span class="readmore"><a href="http://www.jiucool.com/dom4j-xml-xmlns/" title="dom4j为生成XML的文件添加xmlns属性">Read More: 557 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p>今天在开发sitemap地图时遇到一个小小问题，就是xmlns属性的添加！我们知道sitmap 根结点有一些属性！大体如下：
<p/>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;urlset</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://www.sitemaps.org/schemas/sitemap/0.9&quot;</span> </span>
<span style="color: #009900;"><span style="color: #000066;">xmlns:xsi</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span> </span>
<span style="color: #009900;"><span style="color: #000066;">xsi:schemaLocation</span>=<span style="color: #ff0000;">&quot;http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/urlset<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p><a href="http://www.jiucool.com/tag/xmlns/" class="st_tag internal_tag" rel="tag" title="Posts tagged with xmlns">xmlns</a> 是什么 意思，字面意思我们就可以理解，意思就是XML（可扩展标识语言）命名空间！而我们在添加此类属性时一般是用的addAttribute, addNamespce 方法！但实际使用上来看，都不行。
<p/>
经研究发现原来如此:
<p/>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #003399;">Document</span> document <span style="color: #339933;">=</span> DocumentHelper.<span style="color: #006633;">createDocument</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003399;">Element</span> urlset <span style="color: #339933;">=</span> document.<span style="color: #006633;">addElement</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;urlset&quot;</span>, <span style="color: #0000ff;">&quot;http://www.sitemaps.org/schemas/sitemap/0.9&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
urlset.<span style="color: #006633;">addNamespace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;xsi&quot;</span>,<span style="color: #0000ff;">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
urlset.<span style="color: #006633;">addAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;xsi:schemaLocation&quot;</span>,<span style="color: #0000ff;">&quot;http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>也就是在生成根结点的时候，直接生成了他的命名空间! OK，完美搞定！</p>
<p>No related posts.</p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2010. |
<a href="http://www.jiucool.com/dom4j-xml-xmlns/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/dom4j-xml-xmlns/#comments">8 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/dom4j/" rel="tag">dom4j</a>, <a href="http://www.jiucool.com/tag/java/" rel="tag">java</a>, <a href="http://www.jiucool.com/tag/xml/" rel="tag">xml</a>, <a href="http://www.jiucool.com/tag/xmlns/" rel="tag">xmlns</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/dom4j-xml-xmlns/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>dom4j 删除XML节点</title>
		<link>http://www.jiucool.com/remove-xml-node-dom4j/</link>
		<comments>http://www.jiucool.com/remove-xml-node-dom4j/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 11:37:14 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[xml]]></category>
		<category><![CDATA[应用相关]]></category>
		<category><![CDATA[dom4j]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/?p=7845</guid>
		<description><![CDATA[今天完善开发了一下JAVA RSS生成程序，主要是对XML文件的操作！整理一下思路是这样的：



若XML文件不存在，则生成之

若文件存在，并且新文章与原有item不重复，将新文章内容插入之

删除文章，删除item

控制文章数目变量rssCount，超出该数值先删除最旧的item，然后再插入数据，保证生成数据的准确性。

<span class="readmore"><a href="http://www.jiucool.com/remove-xml-node-dom4j/" title="dom4j 删除XML节点">Read More: 557 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p>今天完善开发了一下JAVA RSS生成程序，主要是对XML文件的操作！整理一下思路是这样的：
<ol>
<li>若XML文件不存在，则生成之</li>
<li>若文件存在，并且新文章与原有item不重复，将新文章内容插入之</li>
<li>删除文章，删除item</li>
<li>控制文章数目变量rssCount，超出该数值先删除最旧的item，然后再插入数据，保证生成数据的准确性。</li>
</ol>
<p> OK,这样就搞定！
<p /> 折腾了半天时间主要浪费在了查找相关API文档及节点删除问题上！ 其实代码写出来很简单，没多少，但思考的时间却是蛮多！
<p /></p>
<p> 下面来看看这个删除XML节点的代码片段：
<p />

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #003399;">List</span> itemList <span style="color: #339933;">=</span> document.<span style="color: #006633;">selectNodes</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;//rss/channel/item&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">//获得item节点list对象</span>
<span style="color: #000066; font-weight: bold;">int</span> itemListsize <span style="color: #339933;">=</span> itemList.<span style="color: #006633;">size</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> delarray <span style="color: #339933;">=</span> getInItemNumber<span style="color: #009900;">&#40;</span>RssUtils.<span style="color: #006633;">getFilename</span><span style="color: #009900;">&#40;</span>bbsinfo.<span style="color: #006633;">getTypeid</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">//获得每个item对象的guid 标识符并通过getInItemNumber方法对其排序，</span>
<span style="color: #666666; font-style: italic;">//当然如果本来已经是有序的则不需另作排序</span>
<span style="color: #000066; font-weight: bold;">int</span> delorder <span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">while</span> <span style="color: #009900;">&#40;</span>itemListsize <span style="color: #339933;">&gt;=</span> rssCount<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #666666; font-style: italic;">//rssCount控制RSS输出数量	</span>
	<span style="color: #000000; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> x <span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>x <span style="color: #339933;">&lt;</span>itemList.<span style="color: #006633;">size</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>x<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>								
		<span style="color: #003399;">Element</span> itemElement <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Element</span><span style="color: #009900;">&#41;</span>itemList.<span style="color: #006633;">get</span><span style="color: #009900;">&#40;</span>x<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #003399;">Element</span> guidElement <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Element</span><span style="color: #009900;">&#41;</span>itemElement.<span style="color: #006633;">element</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;guid&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>guidElement.<span style="color: #006633;">getText</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">equals</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span>.<span style="color: #006633;">valueOf</span><span style="color: #009900;">&#40;</span>delarray<span style="color: #009900;">&#91;</span>delorder<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			itemElement.<span style="color: #006633;">detach</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #666666; font-style: italic;">//删除节点通过detach()方法，查了半天API文档才找到</span>
			<span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
		 <span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
		delorder<span style="color: #339933;">++;</span>
		itemListsize<span style="color: #339933;">--;</span><span style="color: #666666; font-style: italic;">//这里的++ -- 一定不能忘,否则无限循环!</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>哈哈,我这样标注得够详细了吧!我在网上看到很多朋友是用Iterator进行迭代，个人感觉Iterator在这里不好用，用之麻烦！</p>
<p/>
嗯，除了删除节点问题其他的关于XML文档的生成与添加数据还算容易！</p>
<p />PS. 之前在博客整天喷些没用的东西，嗯，现在写点与工作相关的吧，以做思想标记与日后查找,HOHO&#8230;.</p>
<p>No related posts.</p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2010. |
<a href="http://www.jiucool.com/remove-xml-node-dom4j/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/remove-xml-node-dom4j/#comments">7 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/dom4j/" rel="tag">dom4j</a>, <a href="http://www.jiucool.com/tag/java/" rel="tag">java</a>, <a href="http://www.jiucool.com/tag/xml/" rel="tag">xml</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/remove-xml-node-dom4j/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>jdom dom4j 操作XML</title>
		<link>http://www.jiucool.com/jdom-dom4j-xml-operation/</link>
		<comments>http://www.jiucool.com/jdom-dom4j-xml-operation/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 18:52:38 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[xml]]></category>
		<category><![CDATA[应用相关]]></category>
		<category><![CDATA[dom4j]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jdom]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/jdom-dom4j-xml-operation/</guid>
		<description><![CDATA[昨天晚上研究比较了一下Jdom dom4j操作XML相关内容,jdom 与 dom4j 整个流程下来，个人感觉还是比较喜欢dom4j。

jdom很简单，但是他的操作方式不是很喜欢，jdom先把所有节点创建出来，在最后再将其关系组织起来，这样感觉如果节点过多的话会导致混乱；而dom4j的操作方式是从根节点开始，自上而下节点的创建与关系的组织井井有条！

在性能上来看，如果XML文件过大的话jdom会导致内存溢出，并且效率也不高；dom4j效率与性能上都很高，连Sun的JAXM也在用DOM4J。目前许多开源项目中大量采用DOM4J，例如大名鼎鼎的Hibernate也用DOM4J来读取XML配置文件。 

<span class="readmore"><a href="http://www.jiucool.com/jdom-dom4j-xml-operation/" title="jdom dom4j 操作XML">Read More: 339 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p>昨天晚上研究比较了一下Jdom dom4j操作XML相关内容,<a href="http://www.jiucool.com/tag/jdom/" class="st_tag internal_tag" rel="tag" title="Posts tagged with jdom">jdom</a> 与 <a href="http://www.jiucool.com/tag/dom4j/" class="st_tag internal_tag" rel="tag" title="Posts tagged with dom4j">dom4j</a> 整个流程下来，个人感觉还是比较喜欢dom4j。</p>
<p>jdom很简单，但是他的操作方式不是很喜欢，jdom先把所有节点创建出来，在最后再将其关系组织起来，这样感觉如果节点过多的话会导致混乱；而dom4j的操作方式是从根节点开始，自上而下节点的创建与关系的组织井井有条！</p>
<p>在性能上来看，如果XML文件过大的话jdom会导致内存溢出，并且效率也不高；dom4j效率与性能上都很高，连Sun的JAXM也在用DOM4J。目前许多开源项目中大量采用DOM4J，例如大名鼎鼎的Hibernate也用DOM4J来读取XML配置文件。 </p>
<p>这几天把手头工作做完后，再写下网站RSS、谷歌sitemap、百度sitemap生成程序！</p>
<p>No related posts.</p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2010. |
<a href="http://www.jiucool.com/jdom-dom4j-xml-operation/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/jdom-dom4j-xml-operation/#comments">17 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/dom4j/" rel="tag">dom4j</a>, <a href="http://www.jiucool.com/tag/java/" rel="tag">java</a>, <a href="http://www.jiucool.com/tag/jdom/" rel="tag">jdom</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/jdom-dom4j-xml-operation/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Java数据库连接池lookup用法</title>
		<link>http://www.jiucool.com/java-lookup/</link>
		<comments>http://www.jiucool.com/java-lookup/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 00:41:00 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[应用相关]]></category>
		<category><![CDATA[lookup]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/java-lookup/</guid>
		<description><![CDATA[大项目用框架相对方便些，小一点项目还是不要用框架了太过复杂！

非框架时引用数据源我们一般这样：

Context ctx = new InitialContext(); 

DataSource ds = (DataSource)ctx.lookup(“java:comp/env/jdbc/MysqlDb”);

但看到有的地方是直接这样写的：

DataSource ds = (DataSource)ctx.lookup(“jdbc/MysqlDb”);

<span class="readmore"><a href="http://www.jiucool.com/java-lookup/" title="Java数据库连接池lookup用法">Read More: 787 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p>大项目用框架相对方便些，小一点项目还是不要用框架了太过复杂！</p>
<p>非框架时引用数据源我们一般这样：</p>
<p><code>Context ctx = new InitialContext(); </code></p>
<p><code>DataSource ds = (DataSource)ctx.<a href="http://www.jiucool.com/tag/lookup/" class="st_tag internal_tag" rel="tag" title="Posts tagged with lookup">lookup</a>(“<a href="http://www.jiucool.com/tag/java/" class="st_tag internal_tag" rel="tag" title="Posts tagged with java">java</a>:comp/env/jdbc/MysqlDb”);</code></p>
<p>但看到有的地方是直接这样写的：</p>
<p><code>DataSource ds = (DataSource)ctx.lookup(“jdbc/MysqlDb”);</code></p>
<p>到底有啥区别？</p>
<p>java:comp/env 是环境命名上下文（environment naming context（ENC）），是在EJB规范1.1以后引入的，引入这个是为了解决原来JNDI查找所引起的冲突问题，也是为了提高EJB或者J2EE应用的移植性。</p>
<p>ENC是一个引用，引用是用于定位企业应用程序的外部资源的逻辑名。引用是在应用程序部署描述符文件中定义的。在部署时，引用被绑定到目标可操作环境中资源的物理位置（JNDI名）。使用ENC是把对其它资源的JNDI查找的硬编码解脱出来，通过配置这个引用可以在不修改代码的情况下，将引用指向不同的EJB(JNDI)。 在J2EE中的引用常用的有：</p>
<p>&#8212;&#8212;&#8212;JDBC 数据源引用在java:comp/env/jdbc 子上下文中声明<br />
&#8212;&#8212;&#8212;JMS 连接工厂在java:comp/env/jms 子上下文中声明<br />
&#8212;&#8212;&#8212;JavaMail 连接工厂在java:comp/env/mail 子上下文中声明<br />
&#8212;&#8212;&#8212;URL 连接工厂在 java:comp/env/url子上下文中声明</p>
<p>所以我们还是应该这样写更加规范： <code>Context ctx = new InitialContext(); </code></p>
<p><code>DataSource ds = (DataSource)ctx.lookup(“java:comp/env/jdbc/MysqlDb”);</code></p>
<p>No related posts.</p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2010. |
<a href="http://www.jiucool.com/java-lookup/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/java-lookup/#comments">3 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/java/" rel="tag">java</a>, <a href="http://www.jiucool.com/tag/lookup/" rel="tag">lookup</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/java-lookup/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Windows 下整合tomcat + apache配置</title>
		<link>http://www.jiucool.com/tomcat-apache-integration/</link>
		<comments>http://www.jiucool.com/tomcat-apache-integration/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 10:58:54 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[应用相关]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[tomcat]]></category>
		<category><![CDATA[tomcat-apache整合]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/tomcat-apache-integration/</guid>
		<description><![CDATA[整合apache+tomcat &#8211; 实现的主要功能是如果是jsp和java servlet等动态资源就交由tomcat处理，静态页面则交由于apache 处理.达到负载均衡.

Apache的HTTPD是目前比较受欢迎的网站服务器软件，它不但功能强大，而且完全免费，并且支持市场上流行的各种操作系统(Windows,Linux,Mac os)。同时对于Java Servlet/JSP的支持，通常也会使用同样Apache出品的Tomcat。

<span class="readmore"><a href="http://www.jiucool.com/tomcat-apache-integration/" title="Windows 下整合tomcat + apache配置">Read More: 4050 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p>整合apache+<a href="http://www.jiucool.com/tag/tomcat/" class="st_tag internal_tag" rel="tag" title="Posts tagged with tomcat">tomcat</a> &#8211; 实现的主要功能是如果是jsp和java servlet等动态资源就交由tomcat处理，静态页面则交由于apache 处理.达到负载均衡.</p>
<p>Apache的HTTPD是目前比较受欢迎的网站服务器软件，它不但功能强大，而且完全免费，并且支持市场上流行的各种操作系统(Windows,Linux,Mac os)。同时对于Java Servlet/JSP的支持，通常也会使用同样Apache出品的Tomcat。<br />
Tomcat除了支持Java Servlet/JSP之外，也可以当做网站服务器使用，但是在对于静态的html文件、图片文件等的解析效率上不如Apache HTTPD的执行效率高。应用tomcat的服务器如果网站的访问量较大，系统资源占用会明显升高，近日笔者在项目执行过程中遇到这一问题，便也想到同时应用tomcat+apache服务。Apache负责静态资源处理，tomcat负责jsp和java servlet等动态资源的处理。</p>
<p><strong>下面为当前最新服务器软件(2010-3-4)</strong></p>
<p>准备工作：</p>
<p>1、  <a href="http://www.jiucool.com/tag/apache/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Apache">apache</a> 2.2.14<br />
下载地址：<a title="http://labs.renren.com/apache-mirror/httpd/binaries/win32/apache_2.2.14-win32-x86-no_ssl.msi" href="http://labs.renren.com/apache-mirror/httpd/binaries/win32/apache_2.2.14-win32-x86-no_ssl.msi">http://labs.renren.com/apache-mirror/httpd/binaries/win32/apache_2.2.14-win32-x86-no_ssl.msi</a></p>
<p>2、  Tomcat 6.0<br />
下载地址：<a title="http://tomcat.apache.org/download-60.cgi" href="http://tomcat.apache.org/download-60.cgi">http://tomcat.apache.org/download-60.cgi</a></p>
<p>3、  JDK 1.6.0 update6<br />
下载地址：<a title="http://cds-esd.sun.com/ESD6/JSCDL/jre/6u18-b79/jdk-6u18-windows-i586.exe?AuthParam=1267591733_04eced74758b8f13153f2ae17d8489c2&amp;TicketId=CJ0lg5rMlzOGw5HtXokNAgA%3D&amp;GroupName=CDS&amp;FilePath=/ESD6/JSCDL/jre/6u18-b79/jdk-6u18-windows-i586.exe&amp;File=jdk-6u18-windows-i586.exe" href="http://cds-esd.sun.com/ESD6/JSCDL/jre/6u18-b79/jdk-6u18-windows-i586.exe?AuthParam=1267591733_04eced74758b8f13153f2ae17d8489c2&amp;TicketId=CJ0lg5rMlzOGw5HtXokNAgA%3D&amp;GroupName=CDS&amp;FilePath=/ESD6/JSCDL/jre/6u18-b79/jdk-6u18-windows-i586.exe&amp;File=jdk-6u18-windows-i586.exe">http://cds-esd.sun.com/ESD6/JSCDL/jre/6u18-b79/jdk-6u18-windows-i586.exe?AuthParam=1267591733_04eced74758b8f13153f2ae17d8489c2&amp;TicketId=CJ0lg5rMlzOGw5HtXokNAgA%3D&amp;GroupName=CDS&amp;FilePath=/ESD6/JSCDL/jre/6u18-b79/jdk-6u18-windows-i586.exe&amp;File=jdk-6u18-windows-i586.exe</a></p>
<p>4、JK- apachemod_jk-1.2.28-httpd-2.2.3.so<br />
下载地址：<br />
<a title="http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.28/mod_jk-1.2.28-httpd-2.2.3.so" href="http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.28/mod_jk-1.2.28-httpd-2.2.3.so">http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.28/mod_jk-1.2.28-httpd-2.2.3.so</a><br />
注意jk的版本一定要与你的apache版本相同。Jk下载可以直接到apache.org官网下载，有多种版本，适用于各种操作系统，地址如下：<br />
<a href="http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/">http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/</a><br />
windows 用户进入win32目录，不同的tomcat对应不同jk文件扩展名不同，有可能是*.dll,或者*.so，根据你的tomcat版本下载合适的jk版本。<br />
安装，软件的安装顺序可以适当调整，但是jre(jdk)一定要在tomcat之前安装：<br />
1、安装JRE(JDK)<br />
此处选择默认安装即可，(旧版本的JDK安装完之后需要设置系统的环境变量，JRE和JDK1.5.0以后版本不设置也没关系。)安装完成之后你可以选择按照下面的示例设置你的系统环境变量：我的电脑-&gt;右键属性-&gt;常规-&gt;高级-&gt;环境变量<br />
<a href="http://www.jiucool.com/tag/java/" class="st_tag internal_tag" rel="tag" title="Posts tagged with java">JAVA</a>_HOME = D:\<a href="http://www.jiucool.com/tag/java/" class="st_tag internal_tag" rel="tag" title="Posts tagged with java">Java</a>\jdk1.6.0_18<br />
CLASSPATH =.;D:\Java\jre6\lib\tools.jar<br />
PATH = D:\Java\jre6\bin<br />
注意文件路径要改成你实际安装的路径。<br />
2、Apache安装<br />
此处注意，如果你本机已经装了iis并且占用80端口,务必先在服务中将iis停止或禁用。软件默认安装即可。安装过程中设置Network Domain和Server Name为localhost,设置你的email地址，下方会让你选择only for the current user或for all users。我选择only for the current user。这样Apache就会占用8080端口，并且做为一个系统服务开机自运行。<br />
安装完成之后，你在浏览器中输入http://localhost,将会看到Apache的成功页面.Apache的主目录是d:\Apache \Apache2,此时Apache,已经运行,你可以在窗口的托盘看到他的图标,双击图标，在弹开的窗口选择&#8221;Open Apache Monitor&#8221;,点Stop，停止Apaceh服务，因为下面要安装Tomcat和JK.</p>
<p>PS.如果遇到apache安装后无可用服务时,可以参考前面这篇文章<a href="http://www.jiucool.com/apache-server/" target="_blank">Apache安装后里面无服务解决办法</a><br />
3、Tomcat安装<br />
选择安装目录为了d:\Tomcat,其余为默认安装.更改端口号为8081,以名与apache冲突,成功后在浏览器中输入http://localhost:80801,出现Tomcat页面表示安装成功了。关于 tomcat的设置已经有很多非常详细的文章，在此就不再详述了。<br />
4、JK的安装<br />
把emod_jk-1.2.28-httpd-2.2.3.so 拷贝到 d:\Apache\Apache2\modules\下.<br />
以上安装全部完成后,打开cmd命令提示符,运行d:\Apache \Apache2\bin\Apache.exe -t 你将会看到&#8221;Syntax OK&#8221;，表示Apache配置正常．这个命令非常有用，下面在继续配置Apache的时候还会再次用到。<br />
配置服务器：<br />
1、配置Tomcat<br />
查找目录下的conf/workers.properties文件，并对比下方文本内容，如有不同以下方内容为准修改。</p>
<p>workers.tomcat_home=D:\Program Files\Apache Software Foundation\Tomcat 6.0\ #让mod_jk模块知道Tomcat的位置<br />
workers.java_home=D:\Java\jre6 #让mod_jk模块知道jre的位置<br />
ps=\<br />
worker.list=ajp13 #模块版本<br />
worker.ajp13.port=8009 #工作端口,若没占用则不用修改<br />
worker.ajp13.host=localhost #本机,若上面的Apache主机不为localhost,作相应修改<br />
worker.ajp13.type=ajp13 #类型<br />
worker.ajp13.lbfactor=1 #代理数,不用修改</p>
<p>如果文件不存在则创建。并填充上述内容。<br />
2、配置Apache<br />
打开d:\Apache \Apache2\conf下的httpd.conf，在最后加入下面这段代码并保存。<br />
#设置Apache与Tomcat之间的连接，让 Apache遇到jsp文件时，在后台将其交由Tomcat去处理<br />
LoadModule jk_module modules\mod_jk-1.2.28-httpd-2.2.3.so<br />
#此处mod_jk的文件为你下载的文件<br />
JkWorkersFile &#8220;d:/Tomcat/conf/workers.properties&#8221;<br />
#指定tomcat监听配置文件地址<br />
JkLogFile &#8220;d:/Tomcat/logs/mod_jk2.log&#8221;<br />
#指定日志存放位置<br />
JkLogLevel info<br />
#设置虚拟主机</p>
<pre>
ServerAdmin admin.molei.net
DocumentRoot D:\Users\Jiucool\workspace\leisns\wapmanager
#您的站点项目所在路径，应与tomcat中的目录设置相同
ServerName admin.molei.net
DirectoryIndex index.html index.htm index.jsp
ErrorLog logs/shsc-error_log.txt
CustomLog logs/shsc-access_log.txt common
JkMount /servlet/* ajp13
#让Apache支持对servlet传送，用以Tomcat解析
JkMount /*.jsp ajp13
#让Apache支持对jsp传送，用以Tomcat解析
JkMount /*.do ajp13
#让 Apache支持对.do传送，用以Tomcat解析
JkMount /*.me ajp13
</pre>
<p># 开头的行为注释，可以删除。此处的配置我是以设置虚拟目录，重新指定了serverName,DocumentRoot路径的方式配置站点，实际上，Apache的配置可以非常灵活，你也可以不采用虚拟目录的方式，而直接去修改站点的默认配置，使用任意文本编辑工具，搜索如 ServerName,DocumentRoot,ServerAdmin等相关项，然后将该项的配置根据你的实际情况进行修改即可。我建议大家可以多多尝试不同的配置，这是一种很有乐趣的体验。</p>
<p>所有的修改完成这后，再次执行d:\server\Apache2\bin\Apache.exe -t 如果看到&#8221;Syntax OK&#8221;，说明你所有配置无误，双击窗口的托盘中的图标，然后点击Start运行。</p>
<p>在地址栏中分别输入 http://localhos:8080/，与http://localhost:8081/若结果相同,Apache与Tomcat整合成功能</p>
<p>PS. 可能默认访问apache情况会出现403拒绝页面,可以将下面代码修改:</p>
<pre>
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    deny from all
</pre>
<p>修改为:</p>
<pre>
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Allow from all
</pre>
<p>就可以正常访问了.</p>
<p>参考:(<a href="http://www.cjsdn.net/post/view?bid=11&amp;id=172565" target="_blank">java开发网</a>)</p>
<p>No related posts.</p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2010. |
<a href="http://www.jiucool.com/tomcat-apache-integration/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/tomcat-apache-integration/#comments">18 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/apache/" rel="tag">Apache</a>, <a href="http://www.jiucool.com/tag/tomcat/" rel="tag">tomcat</a>, <a href="http://www.jiucool.com/tag/tomcat-apache%e6%95%b4%e5%90%88/" rel="tag">tomcat-apache整合</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/tomcat-apache-integration/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Apache安装后里面无服务解决办法</title>
		<link>http://www.jiucool.com/apache-server/</link>
		<comments>http://www.jiucool.com/apache-server/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 04:31:24 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[应用相关]]></category>
		<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/apache-server/</guid>
		<description><![CDATA[win7下安装apache后,启动Monitor apache servers里面无服务可以启动. 查看系统服务里也无apache服务运行,那就是说apache没有注册成功.

那么们需要重新注册下,我们需要以管理员身份运行CMD.EXE程序,必须以管理员身份运行,否则会出现:

Installing the apache&#160; service    &#60;OS 5&#62;拒绝访问.&#160; :Failed to open the WinNT service manager

<span class="readmore"><a href="http://www.jiucool.com/apache-server/" title="Apache安装后里面无服务解决办法">Read More: 236 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p>win7下安装apache后,启动Monitor <a href="http://www.jiucool.com/tag/apache/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Apache">apache</a> servers里面无服务可以启动. 查看系统服务里也无apache服务运行,那就是说apache没有注册成功.</p>
<p>那么们需要重新注册下,我们需要以管理员身份运行CMD.EXE程序,必须以管理员身份运行,否则会出现:</p>
<p>Installing the apache&#160; service    <br />&lt;OS 5&gt;拒绝访问.&#160; :Failed to open the WinNT service manager</p>
<p><a href="http://pic.jiucool.com/2010/03/cmd.jpg" target="_blank"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="管理员权限运行cmd程序" border="0" alt="管理员权限运行cmd程序" src="http://pic.jiucool.com/2010/03/cmd_thumb.jpg" width="504" height="292" /></a> </p>
<p><a href="http://pic.jiucool.com/2010/03/cmd1.jpg" target="_blank"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="管理员权限运行cmd程序1" border="0" alt="管理员权限运行cmd程序1" src="http://pic.jiucool.com/2010/03/cmd1_thumb.jpg" width="504" height="135" /></a> </p>
<p>OK,注册成功,我们久违的界面出来了.</p>
<p><a href="http://pic.jiucool.com/2010/03/apache.jpg" target="_blank"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="apache" border="0" alt="apache" src="http://pic.jiucool.com/2010/03/apache_thumb.jpg" width="504" height="318" /></a> </p>
<p>apache服务正常了.</p>
<p>No related posts.</p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2010. |
<a href="http://www.jiucool.com/apache-server/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/apache-server/#comments">11 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/apache/" rel="tag">Apache</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/apache-server/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Nginx 无缝升级到 0.7.62</title>
		<link>http://www.jiucool.com/nginx-upgrade/</link>
		<comments>http://www.jiucool.com/nginx-upgrade/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 07:04:39 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[应用相关]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[nginx 升级]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/?p=6793</guid>
		<description><![CDATA[刚刚看到的nginx漏洞公告。

问题版本：此漏洞存在于nginx-0.1.0至2009年9月14号前发布的nginx任何版本。

漏洞详情：9月14号发现了一个缓冲区溢出漏洞，此漏洞会导致nginx的worker进程 crash，从而可以制造dos攻击。

解决方案：patch或更新nginx到9月14日发布的最新版本，分别为0.5.38、0.6.39、0.7.62和0.8.15。

关于此漏洞的更多详情见： http://www.kb.cert.org/vuls/id/180065 http://www.nginx.net/

<span class="readmore"><a href="http://www.jiucool.com/nginx-upgrade/" title="Nginx 无缝升级到 0.7.62">Read More: 899 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p>刚刚看到的nginx漏洞公告。</p>
<p>问题版本：此漏洞存在于nginx-0.1.0至2009年9月14号前发布的nginx任何版本。<br />
漏洞详情：9月14号发现了一个缓冲区溢出漏洞，此漏洞会导致nginx的worker进程 crash，从而可以制造dos攻击。<br />
解决方案：patch或更新nginx到9月14日发布的最新版本，分别为0.5.38、0.6.39、0.7.62和0.8.15。</p>
<p>关于此漏洞的更多详情见： <a href="http://www.kb.cert.org/vuls/id/180065">http://www.kb.cert.org/vuls/id/180065</a> <a href="http://www.nginx.net/">http://www.nginx.net/</a></p>
<p>之前用的nginx 版本为0.7.61,所以也该升级下喽!(参考:<a href="http://blog.licess.cn/nginx-upgrade/">Nginx无缝升级</a> )</p>
<p>首先到nginx官网下下载最新stable版本:</p>
<p><span style="color: #ff0000;">wget </span><a title="http://sysoev.ru/nginx/nginx-0.7.62.tar.gz" href="http://sysoev.ru/nginx/nginx-0.7.62.tar.gz"><span style="color: #ff0000;">http://sysoev.ru/nginx/nginx-0.7.62.tar.gz</span></a></p>
<p>然后 <span style="color: #ff0000;">tar zxvf <a href="http://www.jiucool.com/tag/nginx/" class="st_tag internal_tag" rel="tag" title="Posts tagged with nginx">nginx</a>-0.7.62.tar.gz</span></p>
<p>再进入目录<span style="color: #ff0000;">cd nginx-0.7.62</span></p>
<p><span style="color: #ff0000;"> </span><code>./configure --user=www --group=www --prefix=/usr/local/nginx  --with-http_stub_status_module --with-http_ssl_module</code></p>
<p><span style="color: #ff0000;">再make </span></p>
<p><span style="color: #ff0000;">编译完后有一个Nginx执行文件.</span></p>
<p>备份下原来老的nginx文件</p>
<p>mv /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.old</p>
<p>在把新objs下的nginx cp到sbin下。</p>
<p>nginx -t 测试下，显示通过。</p>
<p>//让nginx把nginx.pid改成nginx.pid.oldbin 跟着启动新的nginx<br />
# kill -USR2 `cat /usr/local/nginx/nginx.pid`</p>
<p>//退出旧的nignx<br />
# kill -QUIT `cat /usr/local/nginx/nginx.pid.oldbin`</p>
<p>升级完成！已经升级至0.7.62喽!</p>
<div class="wp-caption aligncenter" style="width: 320px"><a title="nginx 0.7.62" rel="lightbox" href="http://pic.jiucool.com/2009/Nginx0.7.62_D238/nginx0.7.62.jpg"><img style="border: 0pt none; display: block; margin-left: auto; margin-right: auto;" title="nginx 0.7.62" src="http://pic.jiucool.com/2009/Nginx0.7.62_D238/nginx0.7.62_thumb.jpg" border="0" alt="nginx 0.7.62" width="310" height="111" /></a><p class="wp-caption-text">nginx 0.7.62</p></div>
<p>Related posts:<ol>
<li><a href='http://www.jiucool.com/nginx-upgrade-2/' rel='bookmark' title='Nginx 升级'>Nginx 升级</a></li>
<li><a href='http://www.jiucool.com/upgrade-to-the-nginx-0-7-67-full-version/' rel='bookmark' title='升级至Nginx 0.7.67正式版'>升级至Nginx 0.7.67正式版</a></li>
<li><a href='http://www.jiucool.com/vps-seamless-migration-and-rapid-installation/' rel='bookmark' title='VPS 无缝迁移及快速安装'>VPS 无缝迁移及快速安装</a></li>
<li><a href='http://www.jiucool.com/nginx-binding-independent-ip/' rel='bookmark' title='Nginx 网站绑定独立IP'>Nginx 网站绑定独立IP</a></li>
<li><a href='http://www.jiucool.com/wp-super-cache-nginx/' rel='bookmark' title='Wp-Super-Cache在Nginx下配置'>Wp-Super-Cache在Nginx下配置</a></li>
<li><a href='http://www.jiucool.com/under-the-64-bit-linux-install-flash/' rel='bookmark' title='64位Linux下 flash插件安装'>64位Linux下 flash插件安装</a></li>
<li><a href='http://www.jiucool.com/nginx-rewrite/' rel='bookmark' title='Nginx环境下supesite discuz wordpress静态化'>Nginx环境下supesite discuz wordpress静态化</a></li>
<li><a href='http://www.jiucool.com/terror-mysql-bin-0000x-log-file/' rel='bookmark' title='恐怖的MySql-bin.0000X日志文件'>恐怖的MySql-bin.0000X日志文件</a></li>
</ol></p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2009. |
<a href="http://www.jiucool.com/nginx-upgrade/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/nginx-upgrade/#comments">18 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/nginx/" rel="tag">nginx</a>, <a href="http://www.jiucool.com/tag/nginx-%e5%8d%87%e7%ba%a7/" rel="tag">nginx 升级</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/nginx-upgrade/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Wp-Super-Cache在Nginx下配置</title>
		<link>http://www.jiucool.com/wp-super-cache-nginx/</link>
		<comments>http://www.jiucool.com/wp-super-cache-nginx/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 03:53:01 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[应用相关]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[wp-supe-cache-nginx]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/wp-super-cache-nginx/</guid>
		<description><![CDATA[关于wp-super-cache Nginx下的配置大家可以参考下vpsee的这篇文章.Nginx+FastCGI 运行 WordPress 和 WP Super Cache,不同系统可能稍有区别,灵活运用即可!

按此配置完之后,记得要将缓存目录及配置文件设置为可写,否则Wp-Super-Cache也是不能成功启用的哦!比如:plugins、 cache、  upgrade、 advanced-cache.php、 wp-cache-config.php等目录权限要设置好喽！

<span class="readmore"><a href="http://www.jiucool.com/wp-super-cache-nginx/" title="Wp-Super-Cache在Nginx下配置">Read More: 228 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p>关于wp-super-cache Nginx下的配置大家可以参考下vpsee的这篇文章.<a href="http://www.vpsee.com/2009/06/run-wordpress-wpsupercache-with-nginx-fastcg/" target="_blank">Nginx+FastCGI 运行 WordPress 和 WP Super Cache</a>,不同系统可能稍有区别,灵活运用即可!</p>
<p>按此配置完之后,记得要将缓存目录及配置文件设置为可写,否则Wp-Super-Cache也是不能成功启用的哦!比如:plugins、 cache、  upgrade、 advanced-cache.<a href="http://www.jiucool.com/tag/php-2/" class="st_tag internal_tag" rel="tag" title="Posts tagged with php">php</a>、 wp-cache-config.php等目录权限要设置好喽！</p>
<p>No related posts.</p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2009. |
<a href="http://www.jiucool.com/wp-super-cache-nginx/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/wp-super-cache-nginx/#comments">22 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/nginx/" rel="tag">nginx</a>, <a href="http://www.jiucool.com/tag/wp-supe-cache-nginx/" rel="tag">wp-supe-cache-nginx</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/wp-super-cache-nginx/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>Nginx环境下supesite discuz wordpress静态化</title>
		<link>http://www.jiucool.com/nginx-rewrite/</link>
		<comments>http://www.jiucool.com/nginx-rewrite/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 15:21:42 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[应用相关]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[nginx静态化]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/nginx-rewrite/</guid>
		<description><![CDATA[前段时间购买了MediaTemple 的GS的主机,用的是大猫的优惠码,价格为160USD,用了几天时间发现问题多多,不是提示我内存超出限制就是连接被重置,无法正常使用,无奈,弃之&#8230;&#8230;..

后来购买了跟showfom小朋友同一家的的美国VPS主机,用起来感觉不错,随机赠送2个独立IP.

在VPS上装的是口碑较好的 nginx,即LNMP. 但nginx下静态化规则与apache不同,需要重新配置,我目前用到的几款程序的静态化规则如下:wordpress 、supesite、discuz,nginx下静态化规则 ctrl+c +v following

<span class="readmore"><a href="http://www.jiucool.com/nginx-rewrite/" title="Nginx环境下supesite discuz wordpress静态化">Read More: 1609 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p>前段时间购买了MediaTemple 的GS的主机,用的是大猫的优惠码,价格为160USD,用了几天时间发现问题多多,不是提示我内存超出限制就是连接被重置,无法正常使用,无奈,弃之&#8230;&#8230;..</p>
<p>后来购买了跟<a href="http://zou.lu/" target="_blank">showfom</a>小朋友同一家的的美国VPS主机,用起来感觉不错,随机赠送2个独立IP.</p>
<p>在VPS上装的是口碑较好的 <a href="http://www.jiucool.com/tag/nginx/" class="st_tag internal_tag" rel="tag" title="Posts tagged with nginx">nginx</a>,即LNMP. 但nginx下静态化规则与apache不同,需要重新配置,我目前用到的几款程序的静态化规则如下:<a href="http://www.jiucool.com/tag/wordpress/" class="st_tag internal_tag" rel="tag" title="Posts tagged with WordPress">wordpress</a> 、supesite、discuz,nginx下静态化规则 ctrl+c +v following</p>
<p>//supesite nginx 静态化规则<br />
rewrite ^/([0-9]+)/spacelist(.+)$ /index.<a href="http://www.jiucool.com/tag/php-2/" class="st_tag internal_tag" rel="tag" title="Posts tagged with php">php</a>?uid/$1/action/spacelist/type$2 last;<br />
rewrite ^/([0-9]+)/viewspace(.+)$ /index.php?uid/$1/action/viewspace/itemid$2 last;<br />
rewrite ^/([0-9]+)/viewbbs(.+)$ /index.php?uid/$1/action/viewbbs/tid$2 last;<br />
rewrite ^/([0-9]+)/(.*)$ /index.php?uid/$1/$2 last;<br />
rewrite ^/([0-9]+)$ /index.php?uid/$1 last;<br />
rewrite ^/action(.+)$ /index.php?action$1 last;<br />
rewrite ^/category(.+)$ /index.php?action/category/catid$1 last;<br />
rewrite ^/viewnews(.+)$ /index.php?action/viewnews/itemid$1 last;<br />
rewrite ^/viewthread(.+)$ /index.php?action/viewthread/tid$1 last;<br />
rewrite ^/mygroup(.+)$ /index.php?action/mygroup/gid$1 last;</p>
<p>//discuz  nginx 静态化规则</p>
<p>rewrite ^/archiver/((fid|tid)-[\w\-]+\.html)$ /archiver/index.php?$1 last;<br />
rewrite ^/forum-([0-9]+)-([0-9]+)\.html$ /forumdisplay.php?fid=$1&amp;page=$2 last;<br />
rewrite ^/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ /viewthread.php?tid=$1&amp;extra=page%3D$3&amp;page=$2 last;<br />
rewrite ^/space-(username|uid)-(.+)\.html$ /space.php?$1=$2 last;<br />
rewrite ^/tag-(.+)\.html$ /tag.php?name=$1 last;<br />
break;</p>
<p>//wordpress nginx 静态化规则<br />
location / {<br />
index index.html index.php;<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 />
}</p>
<p>现在本博客于一小时前也已经搬迁到此款VPS上来了,大家感觉下速度如何?</p>
<p>PS.上次看完<a href="http://www.jiucool.com/jian-guo-da-ye/" target="_blank">《建国大业》</a>生病高烧一直到现在才好些，发烧必须到北京指定医院就诊，还要验血，还好，验完之后，一切正常！顺利回家，哈哈……</p>
<p>No related posts.</p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2009. |
<a href="http://www.jiucool.com/nginx-rewrite/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/nginx-rewrite/#comments">57 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/nginx/" rel="tag">nginx</a>, <a href="http://www.jiucool.com/tag/nginx%e9%9d%99%e6%80%81%e5%8c%96/" rel="tag">nginx静态化</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/nginx-rewrite/feed/</wfw:commentRss>
		<slash:comments>57</slash:comments>
		</item>
		<item>
		<title>从SEO角度谈首页显示摘要OR全文</title>
		<link>http://www.jiucool.com/excerpts-on-the-homepage-good-seo/</link>
		<comments>http://www.jiucool.com/excerpts-on-the-homepage-good-seo/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 20:19:45 +0000</pubDate>
		<dc:creator>久酷</dc:creator>
				<category><![CDATA[应用相关]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[全文]]></category>
		<category><![CDATA[摘要]]></category>

		<guid isPermaLink="false">http://www.jiucool.com/?p=6589</guid>
		<description><![CDATA[在选择主题模板时，一般默认情况下，都是直接显示全文内容包括图片及文字、超链接等，不过我一般个人喜欢是选择在首页显示摘要。

从SEO角度来说，摘要与全文，这两种显示方式哪种更为优良呢？

Mani Karthik认为我们博客上显示摘要更有利于SEO。假如你选择全文输出的话，那么该文章会显示在首页、分类页、标签页及文章页，当然如果我选择摘要输出那么就会大大减少网站的重复内容，将文章内容的权重尽量集中在文章页。虽然我们可以用nofollow、canonical之类属性进行控制，但并不是所有搜索引擎都支持这属性！

<span class="readmore"><a href="http://www.jiucool.com/excerpts-on-the-homepage-good-seo/" title="从SEO角度谈首页显示摘要OR全文">Read More: 374 Words Totally</a></span>]]></description>
			<content:encoded><![CDATA[<p>在选择主题模板时，一般默认情况下，都是直接显示全文内容包括图片及文字、超链接等，不过我一般个人喜欢是选择在首页显示摘要。</p>
<p>从SEO角度来说，摘要与全文，这两种显示方式哪种更为优良呢？</p>
<p><a href="http://www.dailyseoblog.com/" target="_blank">Mani Karthik</a>认为我们博客上显示摘要更有利于SEO。假如你选择全文输出的话，那么该文章会显示在首页、分类页、标签页及文章页，当然如果我选择摘要输出那么就会大大减少网站的重复内容，将文章内容的权重尽量集中在文章页。虽然我们可以用nofollow、canonical之类属性进行控制，但并不是所有搜索引擎都支持这属性！</p>
<p>另外我觉得如果摘要输出的话更好控制网页的长度，全文输出的话，你并不能保证所有文章字数一样、图片数量一样，会导致网页凌乱的感觉,界面不美观!</p>
<p>参考文章:<a href="http://www.dailyseoblog.com/2009/08/is-shortening-posts-by-excerpts-on-the-homepage-good-seo/" target="_blank">Is shortening posts by excerpts on the homepage, good SEO ?</a></p>
<p>Related posts:<ol>
<li><a href='http://www.jiucool.com/for-a-related-article-wordpress-plugin/' rel='bookmark' title='换了一个相关文章的wordpress插件'>换了一个相关文章的wordpress插件</a></li>
<li><a href='http://www.jiucool.com/achieve-wordpress-home-show-features-abstract-thumbnails/' rel='bookmark' title='实现WordPress首页显示摘要缩略图功能'>实现WordPress首页显示摘要缩略图功能</a></li>
<li><a href='http://www.jiucool.com/my-twitter-account-is-locked/' rel='bookmark' title='我的twitter帐号被锁定'>我的twitter帐号被锁定</a></li>
<li><a href='http://www.jiucool.com/google-real-time-search/' rel='bookmark' title='Google Real-time search'>Google Real-time search</a></li>
<li><a href='http://www.jiucool.com/bo-ke-shou-ye-shu-chu-quan-wen-huan-shi-shu-chu-zhai-yao/' rel='bookmark' title='博客首页输出全文还是输出摘要'>博客首页输出全文还是输出摘要</a></li>
<li><a href='http://www.jiucool.com/description-and-keywords/' rel='bookmark' title='description 与keywords'>description 与keywords</a></li>
<li><a href='http://www.jiucool.com/20-worth-subscribe-foreign-seo-blog/' rel='bookmark' title='20 个值得订阅的国外SEO博客'>20 个值得订阅的国外SEO博客</a></li>
<li><a href='http://www.jiucool.com/wordcamp-2009-return/' rel='bookmark' title='WordCamp 2009归来'>WordCamp 2009归来</a></li>
</ol></p><br/>
<a href="http://www.jiucool.com/godaddy-domain" target="_blank"><img src="http://pic.jiucool.com/2010/godaddy_score_savings_468x60.jpg" /></a>
<hr />
<p><small>© 久酷 for <a href="http://www.jiucool.com">久酷</a>, 2009. |
<a href="http://www.jiucool.com/excerpts-on-the-homepage-good-seo/" target="_blank">Permalink</a> |
<a href="http://www.jiucool.com/excerpts-on-the-homepage-good-seo/#comments">21 comments</a> |
Twitter:
<a href="http://twitter.com/jiucool" target="_blank">@jiucool</a>
<br/>
Post tags: <a href="http://www.jiucool.com/tag/seo/" rel="tag">seo</a>, <a href="http://www.jiucool.com/tag/%e5%85%a8%e6%96%87/" rel="tag">全文</a>, <a href="http://www.jiucool.com/tag/%e6%91%98%e8%a6%81/" rel="tag">摘要</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.jiucool.com/excerpts-on-the-homepage-good-seo/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
	</channel>
</rss>

