<?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>M78星云CK猪是程序员</title>
	<atom:link href="http://liferar.com/category/ck_is_a_programmer/feed" rel="self" type="application/rss+xml" />
	<link>http://liferar.com</link>
	<description>愿我们的梦想，像光那样，从一颗星到另一颗星!</description>
	<lastBuildDate>Mon, 19 Jul 2010 22:03:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>内存管理及垃圾回收相关知识</title>
		<link>http://liferar.com/memory_management_and_garbage_collection</link>
		<comments>http://liferar.com/memory_management_and_garbage_collection#comments</comments>
		<pubDate>Tue, 08 Sep 2009 11:42:52 +0000</pubDate>
		<dc:creator>CK猪</dc:creator>
				<category><![CDATA[CK猪是程序员]]></category>
		<category><![CDATA[gc]]></category>
		<category><![CDATA[memory]]></category>

		<guid isPermaLink="false">http://liferar.com/?p=153</guid>
		<description><![CDATA[内存管理模块是任何服务器应用程序不可回避的基本功能，初级应用为内存池

使服务器内存不至于严重碎片化
控制内存使用量，避免服务器内存耗尽而停止响应
将程序员从繁杂的内存管理中解放出来专注于业务功能的开发

内存管理的终极境界是垃圾回收，垃圾回收在内存池基础上增加以下功能

对象缓存
自动跟踪对象使用状况并自动回收不再使用的对象，程序员无需显式FREE

以上只是我的一些个人认识，可能有误。下面是相关的论文，内容包括
手动内存管理(malloc,free)
半自动内存管理(Memory Pool, C++ Custom Memory Allocation)
全自动内存管理(Garbage Collection)
相关论文索引：http://www.cs.kent.ac.uk/people/staff/rej/gcbib/gcbibG.html
Richard Jones&#8217;s Garbage Collection page：http://www.cs.kent.ac.uk/people/staff/rej/gc.html#FAQ
GC FAQ（Inlcuding language interface, basic algorithims, etc.）http://www.iecc.com/gclist/GC-faq.html
相关文章

没有找到.

]]></description>
			<content:encoded><![CDATA[<div>内存管理模块是任何服务器应用程序不可回避的基本功能，初级应用为内存池</div>
<ol>
<li>使服务器内存不至于严重碎片化</li>
<li>控制内存使用量，避免服务器内存耗尽而停止响应</li>
<li>将程序员从繁杂的内存管理中解放出来专注于业务功能的开发</li>
</ol>
<div>内存管理的终极境界是垃圾回收，垃圾回收在内存池基础上增加以下功能</div>
<ol>
<li>对象缓存</li>
<li>自动跟踪对象使用状况并自动回收不再使用的对象，程序员无需显式FREE</li>
</ol>
<div>以上只是我的一些个人认识，可能有误。下面是相关的论文，内容包括</div>
<div>手动内存管理(malloc,free)</div>
<div>半自动内存管理(Memory Pool, C++ Custom Memory Allocation)</div>
<div>全自动内存管理(Garbage Collection)</div>
<div><span style="text-decoration: underline;"><span style="color: #0000ff;">相关论文索引：<a href="http://www.cs.kent.ac.uk/people/staff/rej/gcbib/gcbibG.html">http://www.cs.kent.ac.uk/people/staff/rej/gcbib/gcbibG.html</a><br />
Richard Jones&#8217;s Garbage Collection page：<a href="http://www.cs.kent.ac.uk/people/staff/rej/gc.html#FAQ">http://www.cs.kent.ac.uk/people/staff/rej/gc.html#FAQ</a><br />
GC FAQ（Inlcuding language interface, basic algorithims, etc.）<a href="http://www.iecc.com/gclist/GC-faq.html">http://www.iecc.com/gclist/GC-faq.html</a></span></span><a href="http://www.iecc.com/gclist/GC-faq.html" target="_blank"></a></div>
<h3>相关文章</h3>
<ul class="related_posts">
<li>没有找到.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://liferar.com/memory_management_and_garbage_collection/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML不常用标签属性备忘</title>
		<link>http://liferar.com/html_seldom_used_attribute_list</link>
		<comments>http://liferar.com/html_seldom_used_attribute_list#comments</comments>
		<pubDate>Thu, 06 Aug 2009 14:46:52 +0000</pubDate>
		<dc:creator>CK猪</dc:creator>
				<category><![CDATA[CK猪是程序员]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[WEB]]></category>

		<guid isPermaLink="false">http://liferar.com/?p=136</guid>
		<description><![CDATA[&#60;input type=&#8221;text&#8221; /&#62; autocomplete打开或者关闭自动完成功能。
&#60;a hideFoucs=&#8221;fasle&#8221;&#62; 不显示focus虚线，只对IE有效。标准浏览器用CSS样式 outline: none;
相关文章

PHP输出缓存控制( 0 )
javascript中new function()的返回值（并不一定是function的“实例”）( 0 )
WEB前端开发的一些问题备忘( 0 )
Mootools Bug &#8211; Date.getWeek( 0 )

]]></description>
			<content:encoded><![CDATA[<p>&lt;input type=&#8221;text&#8221; /&gt; autocomplete打开或者关闭自动完成功能。</p>
<p>&lt;a hideFoucs=&#8221;fasle&#8221;&gt; 不显示focus虚线，只对IE有效。标准浏览器用CSS样式 outline: none;<br />
<h3>相关文章</h3>
<ul class="related_posts">
<li><a href="http://liferar.com/return_value_of_new_function" title="javascript中new function()的返回值（并不一定是function的“实例”）" rel="bookmark inlinks">javascript中new function()的返回值（并不一定是function的“实例”）</a><span class="count">( 0 )</span></li>
<li><a href="http://liferar.com/web_dev_problem" title="WEB前端开发的一些问题备忘" rel="bookmark inlinks">WEB前端开发的一些问题备忘</a><span class="count">( 0 )</span></li>
<li><a href="http://liferar.com/buffer_control_in_php" title="PHP输出缓存控制" rel="bookmark inlinks">PHP输出缓存控制</a><span class="count">( 0 )</span></li>
<li><a href="http://liferar.com/mootools_bugs_date_getweek" title="Mootools Bug - Date.getWeek" rel="bookmark inlinks">Mootools Bug &#8211; Date.getWeek</a><span class="count">( 0 )</span></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://liferar.com/html_seldom_used_attribute_list/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mootools Bug &#8211; Date.getWeek</title>
		<link>http://liferar.com/mootools_bugs_date_getweek</link>
		<comments>http://liferar.com/mootools_bugs_date_getweek#comments</comments>
		<pubDate>Tue, 23 Jun 2009 11:48:09 +0000</pubDate>
		<dc:creator>CK猪</dc:creator>
				<category><![CDATA[CK猪是程序员]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[WEB]]></category>

		<guid isPermaLink="false">http://liferar.com/?p=126</guid>
		<description><![CDATA[mootools-1.2.2.1-more.js

 getWeek: function(){
  var day = (new Date(this.get('year'), 0, 1)).get('date');//应该为get('day');
  return Math.round((this.get('dayofyear') + (day > 3 ? day - 4 : day + 3)) / 7);
 },

mootools-1.2.3.1-more.js

 getWeek: function(){
  return (this.get('dayofyear')  / 7).ceil();
 },

这个完全错
相关文章

PHP输出缓存控制( 0 )
HTML不常用标签属性备忘( 0 )
WEB前端开发的一些问题备忘( 0 )
javascript中new function()的返回值（并不一定是function的“实例”）( 0 )

]]></description>
			<content:encoded><![CDATA[<p>mootools-1.2.2.1-more.js</p>
<pre lang="javascript" line="1">
 getWeek: function(){
  var day = (new Date(this.get('year'), 0, 1)).get('date');//应该为get('day');
  return Math.round((this.get('dayofyear') + (day > 3 ? day - 4 : day + 3)) / 7);
 },
</pre>
<p>mootools-1.2.3.1-more.js</p>
<pre lang="javascript" line="1">
 getWeek: function(){
  return (this.get('dayofyear')  / 7).ceil();
 },
</pre>
<p>这个完全错<br />
<h3>相关文章</h3>
<ul class="related_posts">
<li><a href="http://liferar.com/web_dev_problem" title="WEB前端开发的一些问题备忘" rel="bookmark inlinks">WEB前端开发的一些问题备忘</a><span class="count">( 0 )</span></li>
<li><a href="http://liferar.com/buffer_control_in_php" title="PHP输出缓存控制" rel="bookmark inlinks">PHP输出缓存控制</a><span class="count">( 0 )</span></li>
<li><a href="http://liferar.com/return_value_of_new_function" title="javascript中new function()的返回值（并不一定是function的“实例”）" rel="bookmark inlinks">javascript中new function()的返回值（并不一定是function的“实例”）</a><span class="count">( 0 )</span></li>
<li><a href="http://liferar.com/html_seldom_used_attribute_list" title="HTML不常用标签属性备忘" rel="bookmark inlinks">HTML不常用标签属性备忘</a><span class="count">( 0 )</span></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://liferar.com/mootools_bugs_date_getweek/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WEB前端开发的一些问题备忘</title>
		<link>http://liferar.com/web_dev_problem</link>
		<comments>http://liferar.com/web_dev_problem#comments</comments>
		<pubDate>Sun, 21 Jun 2009 00:22:58 +0000</pubDate>
		<dc:creator>CK猪</dc:creator>
				<category><![CDATA[CK猪是程序员]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[WEB]]></category>

		<guid isPermaLink="false">http://liferar.com/?p=117</guid>
		<description><![CDATA[懒得整理了，权当备忘，IE的一些BUG
========================
多语言字体baseline不统一
背景和边框渲染错误，设置zoom:1，触发hasLayout可以解决
IE FLOAT BUG

第一个图片比其它的高一个像素。。。
 &#60;ul class=&#8221;people-list tidy&#8221; style=&#8221;margin-left:20px;&#8221;&#62;
  &#60;?php for ($i=0; $i&#60;12; ++$i): ?&#62;
  &#60;li&#62;
   &#60;div&#62;&#60;img src=&#8221;/img/photo_default.gif&#8221; /&#62;&#60;/div&#62;
   &#60;div class=&#8221;info&#8221;&#62;&#60;a class=&#8221;font12&#8243; href=&#8221;/&#8221;&#62;Warren&#60;/a&#62;&#60;/div&#62;
  &#60;/li&#62;
  &#60;?php endfor; ?&#62;
 &#60;/ul&#62;
 
 &#60;ul class=&#8221;people-list tidy&#8221; style=&#8221;margin-left:20px;&#8221;&#62;
  &#60;?php for ($i=0; $i&#60;12; ++$i): ?&#62;
  &#60;li&#62;
   &#60;img src=&#8221;/img/photo_default.gif&#8221; /&#62;
   &#60;a class=&#8221;font12&#8243; href=&#8221;/&#8221;&#62;Warren&#60;/a&#62;
  &#60;/li&#62;
  &#60;?php endfor; ?&#62;
 &#60;/ul&#62;
 
IE6: Whatever:hover只能实现&#60;style&#62;&#60;/style&#62;标签里的hover样式，CSS文件中的无法实现。
点击hover元素后有时会导致onhover类没有被去除
 
8以下版本的IE在渲染非ASCII字符时是不考虑字体的baseline的。直接将区域顶部与字体顶部对齐，这是导致我们做中文布局要是对不齐的根本原因。IE8解决了这个问题。
 
div被图片挡住
相关文章

HTML不常用标签属性备忘( 0 )
javascript中new function()的返回值（并不一定是function的“实例”）( 0 )
PHP输出缓存控制( 0 )
Mootools Bug &#8211; Date.getWeek( [...]]]></description>
			<content:encoded><![CDATA[<div>懒得整理了，权当备忘，IE的一些BUG</div>
<div>========================</div>
<div>多语言字体baseline不统一</div>
<div>背景和边框渲染错误，设置zoom:1，触发hasLayout可以解决</div>
<div>IE FLOAT BUG</div>
<div><img class="alignnone size-full wp-image-124" title="viewfile" src="http://liferar.com/wp-content/uploads/2009/06/viewfile.jpg" alt="viewfile" width="246" height="201" /></div>
<div>第一个图片比其它的高一个像素。。。</div>
<div> &lt;ul class=&#8221;people-list tidy&#8221; style=&#8221;margin-left:20px;&#8221;&gt;<br />
  &lt;?php for ($i=0; $i&lt;12; ++$i): ?&gt;<br />
  &lt;li&gt;<br />
   &lt;div&gt;&lt;img src=&#8221;/img/photo_default.gif&#8221; /&gt;&lt;/div&gt;<br />
   &lt;div class=&#8221;info&#8221;&gt;&lt;a class=&#8221;font12&#8243; href=&#8221;/&#8221;&gt;Warren&lt;/a&gt;&lt;/div&gt;<br />
  &lt;/li&gt;<br />
  &lt;?php endfor; ?&gt;<br />
 &lt;/ul&gt;</div>
<div> </div>
<div> &lt;ul class=&#8221;people-list tidy&#8221; style=&#8221;margin-left:20px;&#8221;&gt;<br />
  &lt;?php for ($i=0; $i&lt;12; ++$i): ?&gt;<br />
  &lt;li&gt;<br />
   &lt;img src=&#8221;/img/photo_default.gif&#8221; /&gt;</div>
<div>   &lt;a class=&#8221;font12&#8243; href=&#8221;/&#8221;&gt;Warren&lt;/a&gt;<br />
  &lt;/li&gt;<br />
  &lt;?php endfor; ?&gt;<br />
 &lt;/ul&gt;</div>
<div> </div>
<div>IE6: Whatever:hover只能实现&lt;style&gt;&lt;/style&gt;标签里的hover样式，CSS文件中的无法实现。</div>
<div>点击hover元素后有时会导致onhover类没有被去除</div>
<div> </div>
<div>8以下版本的IE在渲染非ASCII字符时是不考虑字体的baseline的。直接将区域顶部与字体顶部对齐，这是导致我们做中文布局要是对不齐的根本原因。IE8解决了这个问题。</div>
<div> </div>
<div>div被图片挡住</div>
<h3>相关文章</h3>
<ul class="related_posts">
<li><a href="http://liferar.com/html_seldom_used_attribute_list" title="HTML不常用标签属性备忘" rel="bookmark inlinks">HTML不常用标签属性备忘</a><span class="count">( 0 )</span></li>
<li><a href="http://liferar.com/return_value_of_new_function" title="javascript中new function()的返回值（并不一定是function的“实例”）" rel="bookmark inlinks">javascript中new function()的返回值（并不一定是function的“实例”）</a><span class="count">( 0 )</span></li>
<li><a href="http://liferar.com/buffer_control_in_php" title="PHP输出缓存控制" rel="bookmark inlinks">PHP输出缓存控制</a><span class="count">( 0 )</span></li>
<li><a href="http://liferar.com/mootools_bugs_date_getweek" title="Mootools Bug - Date.getWeek" rel="bookmark inlinks">Mootools Bug &#8211; Date.getWeek</a><span class="count">( 0 )</span></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://liferar.com/web_dev_problem/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>慎用iframe</title>
		<link>http://liferar.com/be_careful_of_iframe</link>
		<comments>http://liferar.com/be_careful_of_iframe#comments</comments>
		<pubDate>Thu, 21 May 2009 20:59:24 +0000</pubDate>
		<dc:creator>CK猪</dc:creator>
				<category><![CDATA[CK猪是程序员]]></category>

		<guid isPermaLink="false">http://liferar.com/?p=101</guid>
		<description><![CDATA[最近在实现一个web编辑器，于是乎用到了传说中人见人怕的iframe。经过四天的拼搏，总算是弄出了个雏形。实现了插入图片，字体修改功能没做，不打算做，个人觉得不是很必要。另外还想实现插入flash，不过最终确认不可能（完美）实现，原因请看下文。
为什么要慎用iframe？
iframe在不同浏览器的行为各异，而且几乎都存在足以把开发者折磨致死的问题。
IE（trident）
问题：

designMode下无法显示flash（这个待确认，似乎是这样的）
iframe失去焦点后再得到焦点时，光标位置将丢失（解决办法下面再说）
选中非文本区域或未选中任何对象（光标仍在iframe内）将丢失光标位置（QQ邮箱好像实现了，看了它的实现方法后再回来确认）

解决方案：

无法解决
在window.onbeforeactivate事件中记录光标位置，在进行编辑操作时恢复光标位置
待解决

代码：
光标的记录与恢复

var bookmark;
var range = document.selection.createRange();
if (range.type.toLowerCase() == "text") {
    bookmark = range.getBookmark();
}

var newRange = document.body.createTextRange();
newRange.moveToBookmark(bookmark);//将光标移到原来的选中区域
newRange.collapse();
newRange.select();

 
Firefox（gecko）
问题：

designMode下无法显示flash
某些情况下不会加载src指定的页面（解决办法下面再说）

解决方案：

无法解决
使用javascript重置iframe的src或者用javascript动态生成iframe并插入到相应节点

Opera（presto）
问题：

designMode下无法显示flash

解决方案：

无法解决

唯一能正确处理iframe的是webkit，越来越喜欢它了，chrome快点出插件，Maxthon3快点完成开发吧。
待续。。。。
随机文章

1480公里的距离也无法隔绝我对你的爱( 0 )
小心思( 2 )
HTML不常用标签属性备忘( 0 )
httpd、php编译参数( 0 )
CentOS国际化配置( 0 )
花花节日快乐( 0 )
贝多芬的情书( 0 )
乌龙事件( 2 )

]]></description>
			<content:encoded><![CDATA[<p>最近在实现一个web编辑器，于是乎用到了传说中人见人怕的iframe。经过四天的拼搏，总算是弄出了个雏形。实现了插入图片，字体修改功能没做，不打算做，个人觉得不是很必要。另外还想实现插入flash，不过最终确认不可能（完美）实现，原因请看下文。</p>
<p>为什么要慎用iframe？</p>
<p>iframe在不同浏览器的行为各异，而且几乎都存在足以把开发者折磨致死的问题。</p>
<p>IE（trident）</p>
<p>问题：</p>
<ol>
<li>designMode下无法显示flash（这个待确认，似乎是这样的）</li>
<li>iframe失去焦点后再得到焦点时，光标位置将丢失（解决办法下面再说）</li>
<li>选中非文本区域或未选中任何对象（光标仍在iframe内）将丢失光标位置（QQ邮箱好像实现了，看了它的实现方法后再回来确认）</li>
</ol>
<p>解决方案：</p>
<ol>
<li>无法解决</li>
<li>在window.onbeforeactivate事件中记录光标位置，在进行编辑操作时恢复光标位置</li>
<li>待解决</li>
</ol>
<p>代码：</p>
<p>光标的记录与恢复</p>
<pre lang="javascript" line="1">
var bookmark;
var range = document.selection.createRange();
if (range.type.toLowerCase() == "text") {
    bookmark = range.getBookmark();
}

var newRange = document.body.createTextRange();
newRange.moveToBookmark(bookmark);//将光标移到原来的选中区域
newRange.collapse();
newRange.select();
</pre>
<p> </p>
<p>Firefox（gecko）<br />
问题：</p>
<ol>
<li>designMode下无法显示flash</li>
<li>某些情况下不会加载src指定的页面（解决办法下面再说）</li>
</ol>
<p>解决方案：</p>
<ol>
<li>无法解决</li>
<li>使用javascript重置iframe的src或者用javascript动态生成iframe并插入到相应节点</li>
</ol>
<p>Opera（presto）<br />
问题：</p>
<ol>
<li>designMode下无法显示flash</li>
</ol>
<p>解决方案：</p>
<ol>
<li>无法解决</li>
</ol>
<p>唯一能正确处理iframe的是webkit，越来越喜欢它了，chrome快点出插件，Maxthon3快点完成开发吧。</p>
<p>待续。。。。<br />
<h3>随机文章</h3>
<ul class="related_posts">
<li><a href="http://liferar.com/chunyushijie" title="春雨时节" rel="bookmark inlinks">春雨时节</a><span class="count">( 0 )</span></li>
<li><a href="http://liferar.com/the_ensuing_tragedy" title="接踵而来的杯具" rel="bookmark inlinks">接踵而来的杯具</a><span class="count">( 2 )</span></li>
<li><a href="http://liferar.com/web_dev_problem" title="WEB前端开发的一些问题备忘" rel="bookmark inlinks">WEB前端开发的一些问题备忘</a><span class="count">( 0 )</span></li>
<li><a href="http://liferar.com/shining_world" title="闪亮的世界" rel="bookmark inlinks">闪亮的世界</a><span class="count">( 0 )</span></li>
<li><a href="http://liferar.com/80s" title="80后" rel="bookmark inlinks">80后</a><span class="count">( 0 )</span></li>
<li><a href="http://liferar.com/eqtest" title="情商测试" rel="bookmark inlinks">情商测试</a><span class="count">( 0 )</span></li>
<li><a href="http://liferar.com/the_borings" title="烦心琐事" rel="bookmark inlinks">烦心琐事</a><span class="count">( 0 )</span></li>
<li><a href="http://liferar.com/memory_management_and_garbage_collection" title="内存管理及垃圾回收相关知识" rel="bookmark inlinks">内存管理及垃圾回收相关知识</a><span class="count">( 0 )</span></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://liferar.com/be_careful_of_iframe/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>支付宝集成经验之技术支持问题</title>
		<link>http://liferar.com/alipay_problems_technical_support</link>
		<comments>http://liferar.com/alipay_problems_technical_support#comments</comments>
		<pubDate>Sat, 25 Apr 2009 10:10:07 +0000</pubDate>
		<dc:creator>CK猪</dc:creator>
				<category><![CDATA[CK猪是程序员]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[支付宝]]></category>

		<guid isPermaLink="false">http://liferar.com/?p=93</guid>
		<description><![CDATA[
经过三天的努力，终于把接口调通了。在调试的过程中，遇到了一些文档中未提到的问题。而且也发现了文档和PHP编程接口的一些缺陷和错误。
这些缺陷和错误可能给开发者带来了一些误导。


文档错误：
1）所有的文档中都把错误代码HAS_NO_PRIVILEGE(没有权限访问该服务)写成HASNO_PRIVILEGE。

 
文档缺陷：
1）文档《标准快速付款接口文档 V2.0》和《批量付款到帐号》中关于数字签名部分有内容不明确。
《标准快速付款接口文档 V2.0》5.2.4. 支付宝系统返回处理结果：

支付宝系统接收到商户系统发起的请求，处理成功后返回的参数中同样包含有参数sign、sign_type，商户需根据sign_type 计算sign 值，最终检验支付宝系统返回的sign 值，这里要注意的是商户需要对每一个返回参数的值先进行decode 后再验证sign。


这里的decode我的理解应该是转换编码的意思吧?!但第一次看会很直觉地以为是urldecode。


2）文档中没有提到，本地以某种编码提交给支付宝，支付宝在发通知的时候就会以该编码对数据进行编码并发回本地。虽然这是比较容易想到的，但是文档还是应该说清楚。毕竟，搞错编码是网络传输中经常会出问题。
3）支付宝返回到我的return_url中的参数中，is_success这个参数没有说明，虽然字面就看得出来，但是写到文档里也没什么不好吧。
4）文档《标准快速付款接口文档 V2.0》中没有错误代码TRADE_SELLER_NOT_MATCH，网上查了好像是网址不匹配还是什么原因，不清楚。重现方法：用测试帐号***@***.com发个out_trade_no为1的请求就会出现。
5）文档中还没提到，当网站使用非第三方权威机构签名的SSL证书时，将收不到支付宝的notify。确认已经加了notify_url。


PHP编程接口缺陷：
1）编程接口及示例代码写得过于随便，出现明显的错误
批量支付示例代码index.php中

"pay_date" => date(Ymd),  //付款日期 格式20070412

应为

"pay_date" => date('Ymd'),  //付款日期 格式20070412


"batch_no"  => date(Ymdhms) , //批量付款订单号

应为

"batch_no"  => date('Ymdhms') , //批量付款订单号



出现这个错误，说明了支付宝在发demo代码给用户时没有先测试，至少是发给我的这份没有，因为这个demo是不可能运行得起来的。


2）alipay_service.php中


if($parameter['_input_charset'] == "")

应为

if (array_key_exists('_input_charset', $parameter))


否则，当传进来的$parameter不包含_input_charset项是会出现错误Undefined index: _input_charset


3)编程接口能写得完善一些，实现DSA签名和RAS签名功能


另外，demo代码中把提交表单的按钮放到form外面了。一开始我没注意为什么要这么做，后来遇到签名错误时，弄了一个小时才发现，原来的我把提交按钮放到了FORM里面，并给了提交按钮一个name属性。这导致了提交到支付宝的数据中多了一项，导致签名错误。这是一个很隐蔽的陷阱，在文档中明确提醒集成开发者，相信会对集成开发者有很大的帮助。避免像我一样浪费了一个小时才找到错误原因。

相关文章

PHP输出缓存控制( 0 )
PHP中=赋值操作符对不同数据类型的不同行为( 0 )
httpd、php编译参数( 0 )

]]></description>
			<content:encoded><![CDATA[<p>
经过三天的努力，终于把接口调通了。在调试的过程中，遇到了一些文档中未提到的问题。而且也发现了文档和PHP编程接口的一些缺陷和错误。<br />
这些缺陷和错误可能给开发者带来了一些误导。
</p>
<p>
文档错误：<br />
1）所有的文档中都把错误代码HAS_NO_PRIVILEGE(没有权限访问该服务)写成HASNO_PRIVILEGE。
</p>
<p> <br />
文档缺陷：<br />
1）文档《标准快速付款接口文档 V2.0》和《批量付款到帐号》中关于数字签名部分有内容不明确。<br />
《标准快速付款接口文档 V2.0》5.2.4. 支付宝系统返回处理结果：</p>
<blockquote><p>
支付宝系统接收到商户系统发起的请求，处理成功后返回的参数中同样包含有参数sign、sign_type，商户需根据sign_type 计算sign 值，最终检验支付宝系统返回的sign 值，这里要注意的是商户需要对每一个返回参数的值先进行decode 后再验证sign。
</p></blockquote>
<p>
这里的decode我的理解应该是转换编码的意思吧?!但第一次看会很直觉地以为是urldecode。
</p>
<p>
2）文档中没有提到，本地以某种编码提交给支付宝，支付宝在发通知的时候就会以该编码对数据进行编码并发回本地。虽然这是比较容易想到的，但是文档还是应该说清楚。毕竟，搞错编码是网络传输中经常会出问题。<br />
3）支付宝返回到我的return_url中的参数中，is_success这个参数没有说明，虽然字面就看得出来，但是写到文档里也没什么不好吧。<br />
4）文档《标准快速付款接口文档 V2.0》中没有错误代码TRADE_SELLER_NOT_MATCH，网上查了好像是网址不匹配还是什么原因，不清楚。重现方法：用测试帐号***@***.com发个out_trade_no为1的请求就会出现。<br />
5）文档中还没提到，当网站使用非第三方权威机构签名的SSL证书时，将收不到支付宝的notify。确认已经加了notify_url。
</p>
<p>
PHP编程接口缺陷：<br />
1）编程接口及示例代码写得过于随便，出现明显的错误<br />
批量支付示例代码index.php中</p>
<pre lang="php" line="21">
"pay_date" => date(Ymd),  //付款日期 格式20070412
</pre>
<p>应为</p>
<pre lang="php" line="21">
"pay_date" => date('Ymd'),  //付款日期 格式20070412
</pre>
<pre lang="php" line="25">
"batch_no"  => date(Ymdhms) , //批量付款订单号
</pre>
<p>应为</p>
<pre lang="php" line="25">
"batch_no"  => date('Ymdhms') , //批量付款订单号
</pre>
</p>
<p>
出现这个错误，说明了支付宝在发demo代码给用户时没有先测试，至少是发给我的这份没有，因为这个demo是不可能运行得起来的。
</p>
<p>
2）alipay_service.php中
</p>
<pre lang="php" line="26">
if($parameter['_input_charset'] == "")
</pre>
<p>应为</p>
<pre lang="php" line="26">
if (array_key_exists('_input_charset', $parameter))
</pre>
<p><p>
否则，当传进来的$parameter不包含_input_charset项是会出现错误Undefined index: _input_charset
</p>
<p>
3)编程接口能写得完善一些，实现DSA签名和RAS签名功能
</p>
<p>
另外，demo代码中把提交表单的按钮放到form外面了。一开始我没注意为什么要这么做，后来遇到签名错误时，弄了一个小时才发现，原来的我把提交按钮放到了FORM里面，并给了提交按钮一个name属性。这导致了提交到支付宝的数据中多了一项，导致签名错误。这是一个很隐蔽的陷阱，在文档中明确提醒集成开发者，相信会对集成开发者有很大的帮助。避免像我一样浪费了一个小时才找到错误原因。
</p>
<h3>相关文章</h3>
<ul class="related_posts">
<li><a href="http://liferar.com/behavior_of_assignment_operator_in_php" title="PHP中=赋值操作符对不同数据类型的不同行为" rel="bookmark inlinks">PHP中=赋值操作符对不同数据类型的不同行为</a><span class="count">( 0 )</span></li>
<li><a href="http://liferar.com/httpd_php_compile_parameters" title="httpd、php编译参数" rel="bookmark inlinks">httpd、php编译参数</a><span class="count">( 0 )</span></li>
<li><a href="http://liferar.com/buffer_control_in_php" title="PHP输出缓存控制" rel="bookmark inlinks">PHP输出缓存控制</a><span class="count">( 0 )</span></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://liferar.com/alipay_problems_technical_support/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>httpd、php编译参数</title>
		<link>http://liferar.com/httpd_php_compile_parameters</link>
		<comments>http://liferar.com/httpd_php_compile_parameters#comments</comments>
		<pubDate>Thu, 16 Apr 2009 11:09:02 +0000</pubDate>
		<dc:creator>CK猪</dc:creator>
				<category><![CDATA[CK猪是程序员]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://liferar.com/?p=90</guid>
		<description><![CDATA[PHP编译参数
CFLAGS="-O2" ./configure --prefix=/usr/local --with-config-file-path=/etc \
--with-apxs2=/usr/local/httpd/bin/apxs  --with-libdir=lib --with-mysql=no  \
--disable-ipv6 --disable-tokenizer --disable-short-tags --enable-mbstring=shared  \
--with-gettext=shared --with-regex=php --with-freetype-dir=/usr/local --with-gd=shared \
--with-png-dir=/usr/local --with-jpeg-dir=/usr/local --with-pdo-mysql=shared,/usr/local/mysql \
--enable-pdo=shared --with-pdo-sqlite=shared --with-sqlite=shared --with-openssl-dir=/usr/local/openssl \
--with-openssl=/usr/local
APR编译参数
CFLAGS="-O2" ./configure --prefix=/usr/local
APR-UTIL编译参数
CFLAGS="-O2" ./configure --prefix=/usr/local/apr-util/ --with-apr=/usr/local/apr --with-mysql=/usr/local/mysql/
HTTPD编译参数
LDFLAGS="-L/usr/local/apr/lib" ./configure --prefix=/usr/local/httpd --with-apr=/usr/local/apr  \
--with-ssl=/usr/local/openssl --enable-mods-shared=all --enable-so --with-apr-util=/usr/local/apr-util \
--enable-modules=all --enable-isapi=shared --enable-cgi=shared --enable-ssl=shared
相关文章

PHP输出缓存控制( 0 )
支付宝集成经验之技术支持问题( 2 )
PHP中=赋值操作符对不同数据类型的不同行为( 0 )

]]></description>
			<content:encoded><![CDATA[<p>PHP编译参数</p>
<pre lang="conf">CFLAGS="-O2" ./configure --prefix=/usr/local --with-config-file-path=/etc \
--with-apxs2=/usr/local/httpd/bin/apxs  --with-libdir=lib --with-mysql=no  \
--disable-ipv6 --disable-tokenizer --disable-short-tags --enable-mbstring=shared  \
--with-gettext=shared --with-regex=php --with-freetype-dir=/usr/local --with-gd=shared \
--with-png-dir=/usr/local --with-jpeg-dir=/usr/local --with-pdo-mysql=shared,/usr/local/mysql \
--enable-pdo=shared --with-pdo-sqlite=shared --with-sqlite=shared --with-openssl-dir=/usr/local/openssl \
--with-openssl=/usr/local</pre>
<p>APR编译参数</p>
<pre lang="conf">CFLAGS="-O2" ./configure --prefix=/usr/local</pre>
<p>APR-UTIL编译参数</p>
<pre lang="conf">CFLAGS="-O2" ./configure --prefix=/usr/local/apr-util/ --with-apr=/usr/local/apr --with-mysql=/usr/local/mysql/</pre>
<p>HTTPD编译参数</p>
<pre lang="conf">LDFLAGS="-L/usr/local/apr/lib" ./configure --prefix=/usr/local/httpd --with-apr=/usr/local/apr  \
--with-ssl=/usr/local/openssl --enable-mods-shared=all --enable-so --with-apr-util=/usr/local/apr-util \
--enable-modules=all --enable-isapi=shared --enable-cgi=shared --enable-ssl=shared</pre>
<h3>相关文章</h3>
<ul class="related_posts">
<li><a href="http://liferar.com/behavior_of_assignment_operator_in_php" title="PHP中=赋值操作符对不同数据类型的不同行为" rel="bookmark inlinks">PHP中=赋值操作符对不同数据类型的不同行为</a><span class="count">( 0 )</span></li>
<li><a href="http://liferar.com/buffer_control_in_php" title="PHP输出缓存控制" rel="bookmark inlinks">PHP输出缓存控制</a><span class="count">( 0 )</span></li>
<li><a href="http://liferar.com/alipay_problems_technical_support" title="支付宝集成经验之技术支持问题" rel="bookmark inlinks">支付宝集成经验之技术支持问题</a><span class="count">( 2 )</span></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://liferar.com/httpd_php_compile_parameters/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL安装步骤</title>
		<link>http://liferar.com/install_mysql</link>
		<comments>http://liferar.com/install_mysql#comments</comments>
		<pubDate>Mon, 06 Apr 2009 18:34:02 +0000</pubDate>
		<dc:creator>CK猪</dc:creator>
				<category><![CDATA[CK猪是程序员]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://liferar.com/?p=81</guid>
		<description><![CDATA[
添加mysql用户组和mysql用户
从源码编译安装
把mysql/support-files/my-small.cnf（根据实际情况可选择my-large.cnf或者my-medium.cnf）复制到/etc/my.cnf
把mysql/support-files/mysql.server复制到/etc/init.d/mysqld，并添加可执行权限；
运行 mysql/bin/mysql_install_db安装数据库文件
将mysql/var的所有者设置成mysql
设置用户权限和密码

GRANT ALL PRIVELEGES ON *.* TO root@'%' IDENTIFIED BY 'password';
操作系统：CentOS 5.2
相关文章

CentOS开启SELinux导致samba无法访问的解决办法( 4 )
CentOS国际化配置( 0 )
关闭防火墙( 0 )

]]></description>
			<content:encoded><![CDATA[<ol>
<li>添加mysql用户组和mysql用户</li>
<li>从源码编译安装</li>
<li>把mysql/support-files/my-small.cnf（根据实际情况可选择my-large.cnf或者my-medium.cnf）复制到/etc/my.cnf</li>
<li>把mysql/support-files/mysql.server复制到/etc/init.d/mysqld，并添加可执行权限；</li>
<li>运行 mysql/bin/mysql_install_db安装数据库文件</li>
<li>将mysql/var的所有者设置成mysql</li>
<li>设置用户权限和密码</li>
</ol>
<pre lang="sql" line="1">GRANT ALL PRIVELEGES ON *.* TO root@'%' IDENTIFIED BY 'password';</pre>
<p>操作系统：CentOS 5.2</p>
<h3>相关文章</h3>
<ul class="related_posts">
<li><a href="http://liferar.com/turn_off_firewall" title="关闭防火墙" rel="bookmark inlinks">关闭防火墙</a><span class="count">( 0 )</span></li>
<li><a href="http://liferar.com/samba_problem_cause_by_selinux" title="CentOS开启SELinux导致samba无法访问的解决办法" rel="bookmark inlinks">CentOS开启SELinux导致samba无法访问的解决办法</a><span class="count">( 4 )</span></li>
<li><a href="http://liferar.com/centos_i18n_config" title="CentOS国际化配置" rel="bookmark inlinks">CentOS国际化配置</a><span class="count">( 0 )</span></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://liferar.com/install_mysql/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>关闭防火墙</title>
		<link>http://liferar.com/turn_off_firewall</link>
		<comments>http://liferar.com/turn_off_firewall#comments</comments>
		<pubDate>Mon, 06 Apr 2009 16:04:02 +0000</pubDate>
		<dc:creator>CK猪</dc:creator>
				<category><![CDATA[CK猪是程序员]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://liferar.com/?p=78</guid>
		<description><![CDATA[在家做开发开着防火墙是没什么意义的，只会惹来一堆麻烦，关掉为好。
临时关闭

/etc/init.d/iptables stop

永久关闭

chkconfig --level 35 iptables off

相关文章

MySQL安装步骤( 0 )
CentOS开启SELinux导致samba无法访问的解决办法( 4 )
CentOS国际化配置( 0 )

]]></description>
			<content:encoded><![CDATA[<p>在家做开发开着防火墙是没什么意义的，只会惹来一堆麻烦，关掉为好。</p>
<p>临时关闭</p>
<pre lang="conf" line="1">
/etc/init.d/iptables stop
</pre>
<p>永久关闭</p>
<pre lang="conf" line="1">
chkconfig --level 35 iptables off
</pre>
<h3>相关文章</h3>
<ul class="related_posts">
<li><a href="http://liferar.com/install_mysql" title="MySQL安装步骤" rel="bookmark inlinks">MySQL安装步骤</a><span class="count">( 0 )</span></li>
<li><a href="http://liferar.com/samba_problem_cause_by_selinux" title="CentOS开启SELinux导致samba无法访问的解决办法" rel="bookmark inlinks">CentOS开启SELinux导致samba无法访问的解决办法</a><span class="count">( 4 )</span></li>
<li><a href="http://liferar.com/centos_i18n_config" title="CentOS国际化配置" rel="bookmark inlinks">CentOS国际化配置</a><span class="count">( 0 )</span></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://liferar.com/turn_off_firewall/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS国际化配置</title>
		<link>http://liferar.com/centos_i18n_config</link>
		<comments>http://liferar.com/centos_i18n_config#comments</comments>
		<pubDate>Mon, 06 Apr 2009 15:34:40 +0000</pubDate>
		<dc:creator>CK猪</dc:creator>
				<category><![CDATA[CK猪是程序员]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://liferar.com/?p=75</guid>
		<description><![CDATA[配置文件

/etc/sysconfig/i18n

设置为相应的区域和编码就行了

LANG="zh_CN.UTF-8"

相关文章

关闭防火墙( 0 )
MySQL安装步骤( 0 )
CentOS开启SELinux导致samba无法访问的解决办法( 4 )

]]></description>
			<content:encoded><![CDATA[<p>配置文件</p>
<pre lang="conf" line="1">
/etc/sysconfig/i18n
</pre>
<p>设置为相应的区域和编码就行了</p>
<pre lang="conf" line="1">
LANG="zh_CN.UTF-8"
</pre>
<h3>相关文章</h3>
<ul class="related_posts">
<li><a href="http://liferar.com/samba_problem_cause_by_selinux" title="CentOS开启SELinux导致samba无法访问的解决办法" rel="bookmark inlinks">CentOS开启SELinux导致samba无法访问的解决办法</a><span class="count">( 4 )</span></li>
<li><a href="http://liferar.com/turn_off_firewall" title="关闭防火墙" rel="bookmark inlinks">关闭防火墙</a><span class="count">( 0 )</span></li>
<li><a href="http://liferar.com/install_mysql" title="MySQL安装步骤" rel="bookmark inlinks">MySQL安装步骤</a><span class="count">( 0 )</span></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://liferar.com/centos_i18n_config/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
