﻿<?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"
	>

<channel>
	<title>SheHu Mountain</title>
	<atom:link href="http://liuyami.com/feed" rel="self" type="application/rss+xml" />
	<link>http://liuyami.com</link>
	<description>佘湖山的回忆</description>
	<pubDate>Wed, 13 Aug 2008 15:48:51 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>阳光</title>
		<link>http://liuyami.com/archives/39.html</link>
		<comments>http://liuyami.com/archives/39.html#comments</comments>
		<pubDate>Wed, 13 Aug 2008 15:48:51 +0000</pubDate>
		<dc:creator>evila</dc:creator>
		
		<category><![CDATA[生活]]></category>

		<category><![CDATA[阳光]]></category>

		<guid isPermaLink="false">http://liuyami.com/?p=39</guid>
		<description><![CDATA[
]]></description>
		<wfw:commentRss>http://liuyami.com/archives/39.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Fckeditor 修改上传路径以及上传自动更改名称</title>
		<link>http://liuyami.com/archives/32.html</link>
		<comments>http://liuyami.com/archives/32.html#comments</comments>
		<pubDate>Mon, 04 Aug 2008 23:21:40 +0000</pubDate>
		<dc:creator>evila</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[fckeditor]]></category>

		<guid isPermaLink="false">http://liuyami.com/?p=32</guid>
		<description><![CDATA[测试版本：Fckeditor 2.6.3 beta
1.一般情况下，fckeditor上传文件是指定目录（我们这里假设上传到uploads目录中），但是在实际开发中，可能程序会运行在二级目录，http://www.domain.com/app/ 下，在一级目录文件以及目录不能增加或修改的情况下，那我们又得去修改fckeditor里的config.php文件设置上传文件夹，这在很多开源程序中意义重大，拿一个程序来说，我上传的文件永远会在这个目录里中的 uploads 文件夹中。不管我们把这个程序移动到任何子目录中都不需要修改，当然如果你要把uploads文件夹改成其他名字，也很方便。代码如下：

[-]View Code PHP1
2
3
4
5
6
$tmp_workroot = '../../../../../../'; //设置此虚拟目录根路径
$tmp_path = realpath&#40;$tmp_workroot&#41;.'\uploads\\'; //得到绝对路径和合并上传目录
&#160;
//$tmp_abs_path = str_replace('\\','\\\\',$tmp_path); //得到fckeditor接受的绝对路径地址,如果要使用绝对路径上传，程序运行在windows操作系统要用到此代码
$tmp_siteroot = str_replace('/','\\',$_SERVER['DOCUMENT_ROOT']);	//得到根目录并转换
$tmp_relative_path = str_replace('\\','/',str_replace($tmp_siteroot,'',$tmp_path)); //得到相对上传路径
]]></description>
		<wfw:commentRss>http://liuyami.com/archives/32.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>乌云</title>
		<link>http://liuyami.com/archives/29.html</link>
		<comments>http://liuyami.com/archives/29.html#comments</comments>
		<pubDate>Sun, 03 Aug 2008 21:48:59 +0000</pubDate>
		<dc:creator>evila</dc:creator>
		
		<category><![CDATA[生活]]></category>

		<category><![CDATA[乌云]]></category>

		<guid isPermaLink="false">http://liuyami.com/?p=29</guid>
		<description><![CDATA[
]]></description>
		<wfw:commentRss>http://liuyami.com/archives/29.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>把Fckeditor整合到Zend Framework View_Helper里</title>
		<link>http://liuyami.com/archives/22.html</link>
		<comments>http://liuyami.com/archives/22.html#comments</comments>
		<pubDate>Sun, 03 Aug 2008 20:04:57 +0000</pubDate>
		<dc:creator>evila</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[fckeditor]]></category>

		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://liuyami.com/?p=22</guid>
		<description><![CDATA[看到过把fckeditor放进Controller和直接放在模板里的，虽然能成功运行，但总感觉都和Zend Framework规范有点不太相符，个人觉得放在视图助手里科学一点。
Zend Framework v1.52
Fckeditor v2.6.3 beta
其中fckeditor放在public/js/fckeditor目录下
代码如下：

[-]View Code LANGUAGE1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
&#60; ?php
/**************************
@Author  : evila
@Update  :
@Content : Fckeditor 视图辅助类
**************************/
&#160;
class Zend_View_Helper_Fckeditor
{
 function fckeditor($InstanceName='',$value='',$width=800,$height=500,$toolbar='Default')
 {
  require_once 'js/fckeditor/fckeditor.php'
  $iFCKeditor = new FCKeditor($InstanceName)
  $iFCKeditor-&#38;gtBasePath = './js/fckeditor/'
  $iFCKeditor-&#38;gtWidth  = &#34;$width&#34;
  $iFCKeditor-&#38;gtHeight = &#34;$height&#34;
        $iFCKeditor-&#38;gtValue = &#34;$value&#34;
  $iFCKeditor-&#38;gtToolbarSet = &#34;$toolbar&#34;
&#160;
  return $iFCKeditor-&#38;gtCreateHtml()
 }
}

在模板文件里只需 &#60;?php echo $this-&#62;fckeditor(&#8217;InstanceName&#8217;,'test_text&#8217;);?&#62; 调用即可（参数自行输入）。
插件fckeditor引导文件 require_once &#8216;js/fckeditor/fckeditor.php&#8217;; 也可用Zend::Loader()加载，但是根据官方手册介绍，效率是一样的

]]></description>
		<wfw:commentRss>http://liuyami.com/archives/22.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>用PHP现实J2ee持久化访问模式－DAO</title>
		<link>http://liuyami.com/archives/17.html</link>
		<comments>http://liuyami.com/archives/17.html#comments</comments>
		<pubDate>Thu, 03 Apr 2008 16:19:09 +0000</pubDate>
		<dc:creator>evila</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[面向对象]]></category>

		<category><![CDATA[DAO]]></category>

		<category><![CDATA[模式]]></category>

		<guid isPermaLink="false">http://liuyami.com/?p=17</guid>
		<description><![CDATA[在用oop进行数据库编程的时候常常会遇到的一个问题是”阻抗不匹配性“，也就是目前的关系数据库在存储对象数据的时候需要将数据分解，取出的时候又需要重新组织，所以程序中常会出现大量的sql代码，在这种情况下，一大批优秀的持久化框架和设计模式被开发了出来，Hibernate，IBatis等框架被java开发者所熟知，sun公司也提出了自己的j2ee持久化访问模式——DAO（Data Access Object，数据访问对象）。当然框架存在语言上面的局限性，我们无法使用，但设计模式却可以归为自用。]]></description>
		<wfw:commentRss>http://liuyami.com/archives/17.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>网站程序轻松集成Discuz</title>
		<link>http://liuyami.com/archives/16.html</link>
		<comments>http://liuyami.com/archives/16.html#comments</comments>
		<pubDate>Thu, 03 Apr 2008 11:02:14 +0000</pubDate>
		<dc:creator>evila</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[discuz]]></category>

		<category><![CDATA[系统集成]]></category>

		<guid isPermaLink="false">http://liuyami.com/?p=16</guid>
		<description><![CDATA[Discuz是款优秀的BBS论坛程序，很多网站需要和论坛集成，例如显现通行证，但总感觉通过discuz自已提供的的passport现实有点不方便，发了点时间，把各个检测登陆、登陆、退出，做了个概述，希望对各位开发者有所帮助。这里不多说原理了，请看代码里的注释，请注意，此分解是基于Discuz 6.0正式版，如果你使用的其他版本，可能行号不太正确，不过我集成过discuz 5.5，除了行号，其他没什么变化。]]></description>
		<wfw:commentRss>http://liuyami.com/archives/16.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>让人失望的国产游戏</title>
		<link>http://liuyami.com/archives/15.html</link>
		<comments>http://liuyami.com/archives/15.html#comments</comments>
		<pubDate>Wed, 02 Apr 2008 17:22:56 +0000</pubDate>
		<dc:creator>evila</dc:creator>
		
		<category><![CDATA[生活]]></category>

		<category><![CDATA[剑侠世界]]></category>

		<category><![CDATA[游戏]]></category>

		<guid isPermaLink="false">http://liuyami.com/?p=15</guid>
		<description><![CDATA[国产自主开发的网络游戏厂商中，大家津津乐道的恐怕金山的剑侠系列，我早年也玩过剑侠的单机版，通关了N次，最近几年就早就没有玩游戏，但是这几天原先玩“剑网1”拜把子兄弟又叫我玩剑侠世界，当年我们一起等剑网1内测，结果兄弟们好不容易给我搞来的内测号被我不到10分钟就没玩了，再也没碰过这游戏，当时很失望，画面让人失望，走路像瘸子，怎么泡MM呀，有损我形象。我本来已经不想再玩这游戏了，但是兄弟们的盛情难却，别人也是一番好心，给我说剑侠世界有12个门派，我最喜欢的明教也在里面，还有什么乾坤大罗移等明教绝世武功都在内，说的我有点心动了，兄弟又给了我一个重磅炸弹，不要我练，已经帮我练了一个明教的角色，已经30级了，只等我上线玩，于是昨晚忙完了以后，登陆上去看玩了一下，结果金山又让我失望了，明教是没错，乾坤大罗移是40级的角色，但是前期就是一个单一的技能在那机械的杀怪，后期也是，谁等级高了还用低杀伤力的技能杀怪？任务也是杀怪，走到哪里除了人、NPC就是怪，我看了看，整个明教剑系中，就几个技能可以杀怪，可还要等级高，就拿我30级来说吧，只有两个技能，一个什么阴火内功（剑系没有真正的使用剑，剑只是做样子的，但是手里又必须握着剑），一个普通的拿剑子砍，是砍，大家印象中刀子才是砍的对吧？真的游戏策划还不如天龙八部，天龙八部还有很多技能可以让人组合使用，剑侠世界这让我想起了“天堂”里的骑士，单一的攻击方式，机械的杀怪，仅此而已，内置的挂都没有做好，各种物品名字让人眼花，身上穿一个，包里还要绑定一个，扔也扔不掉，做好了一个任务，本来NPC只让我交12个花，结果我怪给了我13朵花，结果花扔又扔不掉，任务取消不了，于是耗在那里，一怒之下线睡觉。
总结一下剑侠世界我个人的感受，这只是我个人的，纯粹为了赚钱而产生的一款仓促的一款游戏，内置外挂为了更好的消耗物品，极品已经公开标价（Ctrl+G可以打开查看），典型的征途模式，这就是所谓国人智慧，贪婪的赚取一些SB的钱，那些不买装备的则是陪太子读书的或者就是被屠杀的对象，另外就是无何止的升级，让人反感。游戏玩人还是人玩游戏？这是个问题。
自认为玩过游戏很多年，从九几年红色警戒、星际争霸，到九八通宵玩UO，再战天堂、转到battle.net上玩Diablo……曾经这些游戏都给我留下了很深的印象，但是很遗憾，男孩子都喜欢看武侠小说，幻想着能找到一款武侠网侠，能在里面快意恩仇，拥有各种奇遇，现在看来这次又会失望，国产游戏，任重而道远……
 
推荐阅读：

中国游戏界的十大硬伤
中国网络游戏怪异现状大盘点
网络游戏拷问玩家道德底线

]]></description>
		<wfw:commentRss>http://liuyami.com/archives/15.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>用Jquery处理JSON数据</title>
		<link>http://liuyami.com/archives/14.html</link>
		<comments>http://liuyami.com/archives/14.html#comments</comments>
		<pubDate>Wed, 02 Apr 2008 14:01:06 +0000</pubDate>
		<dc:creator>evila</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[flickr]]></category>

		<category><![CDATA[Jquery]]></category>

		<category><![CDATA[JSON]]></category>

		<guid isPermaLink="false">http://liuyami.com/?p=14</guid>
		<description><![CDATA[Jquery处理JSON的方法是：jQuery.getJSON( url, [data], [callback] )
 
范例一：用jquery获取我在flickr相册的所有图片，不过考虑速度，只显示4张，完整代码请看DEMO源码。
DEMO：http://liuyami.com/labs/flickr/flickr.html
代码：
  $(function(){
    $.getJSON(&#8221;http://api.flickr.com/services/feeds/photos_public.gne?id=25255302@N03&#38;tagmode=any&#38;format=json&#38;jsoncallback=?&#8221;,function(data){
          $.each(data.items, function(i,item){
            $(&#8221;&#60;img/&#62; &#8220;).attr(&#8221;src&#8221;, item.media.m).appendTo(&#8221;#images&#8221;);
            if ( i == 3 ) return false; //计数器，只显示4张
          });
        });
  });
示范二：处理PHP返回的JSON数据
$(function(){
         $.getJSON(&#8221;data.php&#8221;, function(json){
              for(var i = 0; i &#60; json.length; i++)
              {
                  alert(&#8221;name：&#8221; + json[i].name);
                  alert(&#8221;age：&#8221; + json[i].age);
              }
         });
});
 
]]></description>
		<wfw:commentRss>http://liuyami.com/archives/14.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>用KSES过滤指定html标签</title>
		<link>http://liuyami.com/archives/13.html</link>
		<comments>http://liuyami.com/archives/13.html#comments</comments>
		<pubDate>Wed, 02 Apr 2008 06:26:22 +0000</pubDate>
		<dc:creator>evila</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[html]]></category>

		<category><![CDATA[kses]]></category>

		<category><![CDATA[安全]]></category>

		<guid isPermaLink="false">http://liuyami.com/?p=13</guid>
		<description><![CDATA[无论是ASP、还是PHP，有很多的editor都转用html编辑器，放弃了传统的UBB编辑器，如果是自己或自己信的过的人提交带有HTML代码，可能这不会出现什么问题，但是如果给别有用心的人利用了，可能会有很大的隐患，但是全部屏蔽了HTML，那又不会显示我们想要的效果。
于是KSES出现了，KSES就是过滤全部除程序员指定的HTML TAG以外的一个函数，同时KSES是开源的。
KSES的官方网站地址是：http://sourceforge.net/projects/kses 你可以在这下载最新的kses
下载好，取出来根目录的里的 kses.php，然后我们动手做一个测试：
&#60;?
include &#8216;kses.php&#8217;;//定义一个用来测试的带有HTML TAG的字符串
$string = &#8216;&#60;strong&#62;test STRONG tag&#60;/strong&#62;,&#60;b&#62;test B tag&#60;/b&#62;&#8217;;//允许的html tag 数组
$kses_allowed = array (&#8217;strong&#8217; =&#62; array ());
//输出过滤后的结果
echo kses($string, $kses_allowed);
?&#62; 

 

 
]]></description>
		<wfw:commentRss>http://liuyami.com/archives/13.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>PHP运行在Windows Server 2008下:性能提高130%</title>
		<link>http://liuyami.com/archives/12.html</link>
		<comments>http://liuyami.com/archives/12.html#comments</comments>
		<pubDate>Tue, 01 Apr 2008 08:04:47 +0000</pubDate>
		<dc:creator>evila</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[FastCGI]]></category>

		<category><![CDATA[Windows Server 2008]]></category>

		<guid isPermaLink="false">http://liuyami.com/?p=12</guid>
		<description><![CDATA[我们知道Windows Server 2008 IIS内置的FastCGI机制可以让PHP的解析速度大幅提高,但详细数据是多少呢?MSDN上的告诉我们,一倍还多,130%!
该数据来自新加坡网站StreetDirectory.com,他们部署Windows Server 2008当Web服务器后得到了明显的性能提升,如图:

据网站方面称从用户回馈来看,PHP程序的运行甚至比原生的LAMP环境还要好,他们没有针对访问进行任何优化,所有工作仅仅是升级到Windows Server 2008而已.
这样,网站放就可以以相同的投入获得更高的支撑能力,节省了成本.
]]></description>
		<wfw:commentRss>http://liuyami.com/archives/12.html/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
