<?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>Becomin&#039; Charles &#187; PHP</title>
	<atom:link href="http://sexywp.com/cata/something-about-daily-work/php/feed" rel="self" type="application/rss+xml" />
	<link>http://sexywp.com</link>
	<description>Building another myself~~</description>
	<lastBuildDate>Thu, 19 Apr 2012 16:32:29 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-beta4-20805</generator>
		<item>
		<title>【边学边用】PHP5函数参数的按引用传递</title>
		<link>http://sexywp.com/php5-pass-param-by-ref.htm</link>
		<comments>http://sexywp.com/php5-pass-param-by-ref.htm#comments</comments>
		<pubDate>Fri, 26 Aug 2011 14:07:14 +0000</pubDate>
		<dc:creator>Charles</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[工作相关]]></category>
		<category><![CDATA[心得体会]]></category>
		<category><![CDATA[basic]]></category>
		<category><![CDATA[usage]]></category>

		<guid isPermaLink="false">http://sexywp.com/?p=454</guid>
		<description><![CDATA[PHP是支持引用的，但是关于一个变量什么时候是引用，什么时候是值，我脑子里总是迷迷糊糊的，所以，想用引用的时候，就会不自觉地在所有的地方加上&#038;符号，真的很累赘。为了缓解这个问题，我特意写了下面这个代码片段来增进自己的理解。起初，我对这个东西的理解是，对于对象来说，PHP5就是按照引用传递的。但是我现在想，可能事情不是这么一回事情。下面的代码片段中，$obj其实是A的对象的一个引用，可以理解成一个指针，函数参数$o，其实还是对$obj的拷贝，只是拷贝的是引用本身，也即，$o其实是$obj的拷贝，只是由于其拷贝了$obj，所以，$o也指向A的对象。两个指针指向一个地方，这也是为什么函数changeObj可以改变A的对象的原因。我想，这样大概从技术来说，会更加合理一点。

<span class="readmore"><a href="http://sexywp.com/php5-pass-param-by-ref.htm" title="【边学边用】PHP5函数参数的按引用传递">Keep Reading --- 315 words totally</a></span><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Flet-php5-support-readline.htm&from=http%3A%2F%2Fsexywp.com%2Fphp5-pass-param-by-ref.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Dedian 5的PHP包缺少readline支持</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fdeprecated-features-in-php-5-3.htm&from=http%3A%2F%2Fsexywp.com%2Fphp5-pass-param-by-ref.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">PHP 5.3.x中弃用的特性 Deprecated</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Flinux-commands-used-when-working.htm&from=http%3A%2F%2Fsexywp.com%2Fphp5-pass-param-by-ref.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">工作中常用的Linux命令集锦</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fphp-return.htm&from=http%3A%2F%2Fsexywp.com%2Fphp5-pass-param-by-ref.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">[Tips] PHP中return的用法</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fvideo-guide-to-use-yii-framework.htm&from=http%3A%2F%2Fsexywp.com%2Fphp5-pass-param-by-ref.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">视频教程：使用Yii框架开发Blog</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>PHP是支持引用的，但是关于一个变量什么时候是引用，什么时候是值，我脑子里总是迷迷糊糊的，所以，想用引用的时候，就会不自觉地在所有的地方加上&#038;符号，真的很累赘。为了缓解这个问题，我特意写了下面这个代码片段来增进自己的理解。起初，我对这个东西的理解是，对于对象来说，<a href="http://sexywp.com/tags/php" class="st_tag internal_tag" rel="tag" title="标签 PHP 下的日志">PHP</a>5就是按照引用传递的。但是我现在想，可能事情不是这么一回事情。下面的代码片段中，$obj其实是A的对象的一个引用，可以理解成一个指针，函数参数$o，其实还是对$obj的拷贝，只是拷贝的是引用本身，也即，$o其实是$obj的拷贝，只是由于其拷贝了$obj，所以，$o也指向A的对象。两个指针指向一个地方，这也是为什么函数changeObj可以改变A的对象的原因。我想，这样大概从技术来说，会更加合理一点。</p>
<div class="hl-surround"><div class="hl-main"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li>&nbsp;<span style="color: Blue;">&lt;?php</span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: Green;">class</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">A</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp;&nbsp; &nbsp; </span><span style="color: Green;">public</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">$a</span><span style="color: Gray;">=</span><span style="color: Maroon;">1</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp;&nbsp; &nbsp; </span><span style="color: Green;">public</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">$b</span><span style="color: Gray;">=</span><span style="color: Maroon;">1</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">$obj</span><span style="color: Gray;"> = </span><span style="color: Green;">new</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">A</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">var_dump</span><span style="color: Olive;">(</span><span style="color: #00008b;">$obj</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; </span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: Green;">function</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">changeObj</span><span style="color: Olive;">(</span><span style="color: #00008b;">$o</span><span style="color: Olive;">)</span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp;&nbsp; &nbsp; </span><span style="color: #00008b;">$o</span><span style="color: Gray;">-&gt;</span><span style="color: Blue;">a</span><span style="color: Gray;"> = </span><span style="color: Maroon;">3</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp;&nbsp; &nbsp; </span><span style="color: #00008b;">$o</span><span style="color: Gray;">-&gt;</span><span style="color: Blue;">b</span><span style="color: Gray;"> = </span><span style="color: Maroon;">5</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">changeObj</span><span style="color: Olive;">(</span><span style="color: #00008b;">$obj</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">var_dump</span><span style="color: Olive;">(</span><span style="color: #00008b;">$obj</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li></ol></div></div>
<p>执行结果如下：</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">object(A)#1 (2) {</li>
<li>&nbsp; [&quot;a&quot;]=&gt;</li>
<li>&nbsp; int(1)</li>
<li>&nbsp; [&quot;b&quot;]=&gt;</li>
<li>&nbsp; int(1)</li>
<li>}</li>
<li>object(A)#1 (2) {</li>
<li>&nbsp; [&quot;a&quot;]=&gt;</li>
<li>&nbsp; int(3)</li>
<li>&nbsp; [&quot;b&quot;]=&gt;</li>
<li>&nbsp; int(5)</li>
<li>}</li></ol></div>
<p>然后再看一个普通变量的引用传递的例子，这个例子里面使用的是原生的整型变量，然后函数changeInt的函数声明里，也用一般方法声明参数，普通的调用，我们发现函数不能改变$x和$y的值，这符合我们的预期，但是第二个形式的调用，就是传参数时候，带上引用标志&#038;，结果我们发现，$x和$y的值也改变了，这是为什么呢，跟上面的例子是一个原因，函数的形式参数a和b其实是$x和$y的引用的拷贝，所以a和b也指向x和y，所以，a和b可以改变x和y的值。再看最下面的一种形式，这种是我认为的真正的按照引用传递参数。非常的绕乎对吧？我也觉得如此，确实太过灵活了。确实不利于学习和理解，代码也不容易维护，如果真的想用引用传递参数，推荐用最底下一种方式，明确告诉调用的人，这里其实是引用，千万别用changeInt(&#038;$x, &#038;$y);这种形式，这个代码散步在各处，将极难定位bug。</p>
<div class="hl-surround"><div class="hl-main"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li>&nbsp;<span style="color: Blue;">&lt;?php</span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">$x</span><span style="color: Gray;"> = </span><span style="color: Maroon;">1</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">$y</span><span style="color: Gray;"> = </span><span style="color: Maroon;">2</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; </span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: Green;">function</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">changeInt</span><span style="color: Olive;">(</span><span style="color: #00008b;">$a</span><span style="color: Gray;">, </span><span style="color: #00008b;">$b</span><span style="color: Olive;">)</span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp;&nbsp; &nbsp; </span><span style="color: #00008b;">$a</span><span style="color: Gray;"> = </span><span style="color: Maroon;">3</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp;&nbsp; &nbsp; </span><span style="color: #00008b;">$b</span><span style="color: Gray;"> = </span><span style="color: Maroon;">4</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">changeInt</span><span style="color: Olive;">(</span><span style="color: #00008b;">$x</span><span style="color: Gray;">,</span><span style="color: #00008b;">$y</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">var_dump</span><span style="color: Olive;">(</span><span style="color: #00008b;">$x</span><span style="color: Gray;">, </span><span style="color: #00008b;">$y</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: #ffa500;">//</span><span style="color: #ffa500;">$x = 1, $y = 2</span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">changeInt</span><span style="color: Olive;">(</span><span style="color: Gray;">&amp;</span><span style="color: #00008b;">$x</span><span style="color: Gray;">, &amp;</span><span style="color: #00008b;">$y</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">var_dump</span><span style="color: Olive;">(</span><span style="color: #00008b;">$x</span><span style="color: Gray;">, </span><span style="color: #00008b;">$y</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: #ffa500;">//</span><span style="color: #ffa500;">$x = 3, $y = 4</span></li>
<li><span style="color: Gray;">&nbsp; </span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: Green;">function</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">changeIntByRef</span><span style="color: Olive;">(</span><span style="color: Gray;">&amp;</span><span style="color: #00008b;">$a</span><span style="color: Gray;">, &amp;</span><span style="color: #00008b;">$b</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp;&nbsp; &nbsp; </span><span style="color: #00008b;">$a</span><span style="color: Gray;"> = </span><span style="color: Maroon;">5</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp;&nbsp; &nbsp; </span><span style="color: #00008b;">$b</span><span style="color: Gray;"> = </span><span style="color: Maroon;">6</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">changeIntByRef</span><span style="color: Olive;">(</span><span style="color: #00008b;">$x</span><span style="color: Gray;">, </span><span style="color: #00008b;">$y</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; </span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">var_dump</span><span style="color: Olive;">(</span><span style="color: #00008b;">$x</span><span style="color: Gray;">, </span><span style="color: #00008b;">$y</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: #ffa500;">//</span><span style="color: #ffa500;">$x = 5, $y = 6</span></li></ol></div></div>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Flet-php5-support-readline.htm&from=http%3A%2F%2Fsexywp.com%2Fphp5-pass-param-by-ref.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Dedian 5的PHP包缺少readline支持</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fdeprecated-features-in-php-5-3.htm&from=http%3A%2F%2Fsexywp.com%2Fphp5-pass-param-by-ref.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">PHP 5.3.x中弃用的特性 Deprecated</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Flinux-commands-used-when-working.htm&from=http%3A%2F%2Fsexywp.com%2Fphp5-pass-param-by-ref.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">工作中常用的Linux命令集锦</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fphp-return.htm&from=http%3A%2F%2Fsexywp.com%2Fphp5-pass-param-by-ref.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">[Tips] PHP中return的用法</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fvideo-guide-to-use-yii-framework.htm&from=http%3A%2F%2Fsexywp.com%2Fphp5-pass-param-by-ref.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">视频教程：使用Yii框架开发Blog</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>
	标签：<a href="http://sexywp.com/tags/basic" title="basic" rel="tag">basic</a>, <a href="http://sexywp.com/tags/php" title="PHP" rel="tag">PHP</a>, <a href="http://sexywp.com/tags/usage" title="usage" rel="tag">usage</a><br />
]]></content:encoded>
			<wfw:commentRss>http://sexywp.com/php5-pass-param-by-ref.htm/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Web开发专用IDE：Aptana Studio 3.0</title>
		<link>http://sexywp.com/web-apps-ide-aptana-studio3.htm</link>
		<comments>http://sexywp.com/web-apps-ide-aptana-studio3.htm#comments</comments>
		<pubDate>Tue, 03 May 2011 01:37:02 +0000</pubDate>
		<dc:creator>Charles</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[工作相关]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://sexywp.com/?p=429</guid>
		<description><![CDATA[Aptana Studio是一款专业的、开源的开发环境，主要用于Web应用开发。该开发环境支持最新的浏览器技术HTML5，CSS3，Javascript，除此之外，对服务器端语言Ruby（对RoR貌似有很好的支持），PHP，Python也有很好的支持。

目前能够在Web开发中对HTML，CSS，和JS同时提供编码帮助的IDE环境极其少见，Dreamweaver是我知道的做得比较好的，但是Dreamweaver对语言的支持只做到了静态语法检查和代码高亮，更进一步则无能为力了，只能算是准IDE，毕竟不是真正的IDE环境，NetBeans在这方面有不俗的表现，正是我选用此款IDE的原因。

<span class="readmore"><a href="http://sexywp.com/web-apps-ide-aptana-studio3.htm" title="Web开发专用IDE：Aptana Studio 3.0">Keep Reading --- 497 words totally</a></span><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fbuild-web-server-on-wince-platform.htm&from=http%3A%2F%2Fsexywp.com%2Fweb-apps-ide-aptana-studio3.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">在WinCE上搭建Web服务</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fdeprecated-features-in-php-5-3.htm&from=http%3A%2F%2Fsexywp.com%2Fweb-apps-ide-aptana-studio3.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">PHP 5.3.x中弃用的特性 Deprecated</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fuse-netbeans-to-develop-wp.htm&from=http%3A%2F%2Fsexywp.com%2Fweb-apps-ide-aptana-studio3.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">使用NetBeans IDE 6.5作为WordPress的开发环境</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Flitespeed-web-server.htm&from=http%3A%2F%2Fsexywp.com%2Fweb-apps-ide-aptana-studio3.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Web服务器LiteSpeed</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fpage-speed-family.htm&from=http%3A%2F%2Fsexywp.com%2Fweb-apps-ide-aptana-studio3.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Google用于提高网站质量的工具：Page Speed工具集</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>Aptana Studio是一款专业的、开源的开发环境，主要用于Web应用开发。该开发环境支持最新的浏览器技术HTML5，CSS3，Javascript，除此之外，对服务器端语言Ruby（对RoR貌似有很好的支持），<a href="http://sexywp.com/tags/php" class="st_tag internal_tag" rel="tag" title="标签 PHP 下的日志">PHP</a>，Python也有很好的支持。</p>
<p>目前能够在Web开发中对HTML，CSS，和JS同时提供编码帮助的IDE环境极其少见，Dreamweaver是我知道的做得比较好的，但是Dreamweaver对语言的支持只做到了静态语法检查和代码高亮，更进一步则无能为力了，只能算是准IDE，毕竟不是真正的IDE环境，NetBeans在这方面有不俗的表现，正是我选用此款IDE的原因。</p>
<p>之所以注意到这款IDE，是因为有业内比较资深的工程师提到了这个东西，所以专门了解了一下，这个IDE基于Eclipse框架开发，专门针对Web应用开发领域，尤其强化了对HTML，CSS，JS等语言的支持，对于Server端的语言，选择的也都是专门用于Web开发的语言。本来我对其对PHP开发的支持抱有一定的期待，但是后来听说其将PHP模块从项目中移除，转而投向PDT Project，我就有点失望了，感觉PDT的能力真的只能算一般，不过在不是很了解Aptana的基础上，我还是可以说，那些用普通Eclipse+PDT开发的童鞋，完全可以转头Aptana的怀抱，因为你二者都不会失去，反而可以得到对HTML，CSS，JS的强大支持。使用NetBeans进行Web开发的童鞋，并且平常工作偏重于Server端PHP开发的，可以等待我的进一步体验报告。</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fbuild-web-server-on-wince-platform.htm&from=http%3A%2F%2Fsexywp.com%2Fweb-apps-ide-aptana-studio3.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">在WinCE上搭建Web服务</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fdeprecated-features-in-php-5-3.htm&from=http%3A%2F%2Fsexywp.com%2Fweb-apps-ide-aptana-studio3.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">PHP 5.3.x中弃用的特性 Deprecated</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fuse-netbeans-to-develop-wp.htm&from=http%3A%2F%2Fsexywp.com%2Fweb-apps-ide-aptana-studio3.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">使用NetBeans IDE 6.5作为WordPress的开发环境</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Flitespeed-web-server.htm&from=http%3A%2F%2Fsexywp.com%2Fweb-apps-ide-aptana-studio3.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Web服务器LiteSpeed</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fpage-speed-family.htm&from=http%3A%2F%2Fsexywp.com%2Fweb-apps-ide-aptana-studio3.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Google用于提高网站质量的工具：Page Speed工具集</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>
	标签：<a href="http://sexywp.com/tags/development" title="development" rel="tag">development</a>, <a href="http://sexywp.com/tags/ide" title="IDE" rel="tag">IDE</a>, <a href="http://sexywp.com/tags/php" title="PHP" rel="tag">PHP</a>, <a href="http://sexywp.com/tags/tools" title="tools" rel="tag">tools</a>, <a href="http://sexywp.com/tags/web" title="web" rel="tag">web</a><br />
]]></content:encoded>
			<wfw:commentRss>http://sexywp.com/web-apps-ide-aptana-studio3.htm/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>视频教程：使用Yii框架开发Blog</title>
		<link>http://sexywp.com/video-guide-to-use-yii-framework.htm</link>
		<comments>http://sexywp.com/video-guide-to-use-yii-framework.htm#comments</comments>
		<pubDate>Sun, 20 Mar 2011 06:59:18 +0000</pubDate>
		<dc:creator>Charles</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Yii]]></category>
		<category><![CDATA[工作相关]]></category>
		<category><![CDATA[develop]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[yii]]></category>

		<guid isPermaLink="false">http://sexywp.com/?p=417</guid>
		<description><![CDATA[Yii框架的官方网站上，有一个教学用demo，就是使用Yii框架开发一个blog。有非常详尽的文字描述，步骤基本也比较清楚。一遍走下来，基本上就差不多都学懂了。

上周正好要在公司做分享，害怕当堂演示会说不好，浪费时间，就在家里自己将blog的开发过程录制成了视频，这是我第一次录制视频，觉得格外新鲜，遂决定在这里分享给大家。大家一起乐一乐，O(∩_∩)O哈哈~

第0集 Blog功能需求及应用骨架搭建

<span class="readmore"><a href="http://sexywp.com/video-guide-to-use-yii-framework.htm" title="视频教程：使用Yii框架开发Blog">Keep Reading --- 303 words totally</a></span><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fhow-to-use-log-in-yii-framework.htm&from=http%3A%2F%2Fsexywp.com%2Fvideo-guide-to-use-yii-framework.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Yii框架的Log系统的分析</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fyii-validator-allwoempty-property.htm&from=http%3A%2F%2Fsexywp.com%2Fvideo-guide-to-use-yii-framework.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Yii框架中验证器的allowEmpty属性</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fmvc-best-practice.htm&from=http%3A%2F%2Fsexywp.com%2Fvideo-guide-to-use-yii-framework.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">MVC最佳实践</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Ferror-403-occured-when-use-gii.htm&from=http%3A%2F%2Fsexywp.com%2Fvideo-guide-to-use-yii-framework.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">使用Gii时出现403错误</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Flet-php5-support-readline.htm&from=http%3A%2F%2Fsexywp.com%2Fvideo-guide-to-use-yii-framework.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Dedian 5的PHP包缺少readline支持</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>Yii框架的官方网站上，有一个教学用demo，就是使用Yii框架开发一个blog。有非常详尽的文字描述，步骤基本也比较清楚。一遍走下来，基本上就差不多都学懂了。</p>
<p>上周正好要在公司做分享，害怕当堂演示会说不好，浪费时间，就在家里自己将blog的开发过程录制成了视频，这是我第一次录制视频，觉得格外新鲜，遂决定在这里分享给大家。大家一起乐一乐，O(∩_∩)O哈哈~<span id="more-417"></span></p>
<p>第0集 Blog功能需求及应用骨架搭建<br />
<embed src="http://player.youku.com/player.php/sid/XMjUyMjIxMDE2/v.swf" quality="high" width="480" height="400" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash"></embed></p>
<p>第1集 使用Gii代码生成工具<br />
<embed src="http://player.youku.com/player.php/sid/XMjUyMjI5MTI0/v.swf" quality="high" width="480" height="400" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash"></embed></p>
<p>第2集 使用数据库存储的用户信息来验证用户身份<br />
<embed src="http://player.youku.com/player.php/sid/XMjUyMjMzODc2/v.swf" quality="high" width="480" height="400" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash"></embed></p>
<p>第3集 Blog文章的创建和发布<br />
<embed src="http://player.youku.com/player.php/sid/XMjczMTc1Nzk2/v.swf" quality="high" width="480" height="400" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash"></embed><br />
to be continued&#8230;</p>
<p>多谢大家捧场了，欢迎留言告诉我大家是否喜欢这种形式~</p>
<p>最近新录了一个视频，不过不是关于blog demo的，是关于db部分的分析的，也一并放在这里吧，算是借点这里的人气了：）2012-1-27<br />
<embed src='http://player.youku.com/player.php/sid/XMzQ2NDM1NzUy/v.swf' quality='high' width='480' height='400' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash'></embed></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fhow-to-use-log-in-yii-framework.htm&from=http%3A%2F%2Fsexywp.com%2Fvideo-guide-to-use-yii-framework.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Yii框架的Log系统的分析</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fyii-validator-allwoempty-property.htm&from=http%3A%2F%2Fsexywp.com%2Fvideo-guide-to-use-yii-framework.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Yii框架中验证器的allowEmpty属性</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fmvc-best-practice.htm&from=http%3A%2F%2Fsexywp.com%2Fvideo-guide-to-use-yii-framework.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">MVC最佳实践</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Ferror-403-occured-when-use-gii.htm&from=http%3A%2F%2Fsexywp.com%2Fvideo-guide-to-use-yii-framework.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">使用Gii时出现403错误</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Flet-php5-support-readline.htm&from=http%3A%2F%2Fsexywp.com%2Fvideo-guide-to-use-yii-framework.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Dedian 5的PHP包缺少readline支持</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>
	标签：<a href="http://sexywp.com/tags/develop" title="develop" rel="tag">develop</a>, <a href="http://sexywp.com/tags/framework" title="framework" rel="tag">framework</a>, <a href="http://sexywp.com/tags/php" title="PHP" rel="tag">PHP</a>, <a href="http://sexywp.com/tags/video" title="video" rel="tag">video</a>, <a href="http://sexywp.com/tags/yii-2" title="yii" rel="tag">yii</a><br />
]]></content:encoded>
			<wfw:commentRss>http://sexywp.com/video-guide-to-use-yii-framework.htm/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>MVC最佳实践</title>
		<link>http://sexywp.com/mvc-best-practice.htm</link>
		<comments>http://sexywp.com/mvc-best-practice.htm#comments</comments>
		<pubDate>Mon, 07 Mar 2011 09:44:39 +0000</pubDate>
		<dc:creator>Charles</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Yii]]></category>
		<category><![CDATA[工作相关]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://sexywp.com/?p=414</guid>
		<description><![CDATA[前一段日子，写了一篇《MVC就是一个选择题》，重点描述了我对MVC模式的迷惑。随着我对这个模式应用时间的深入，渐渐感到得心应手，这个模式早在30多年前就已经发明了，确实经受了时间的考验，可以说是千锤百炼。但是，实践过程中，我也发现，更多的时候照猫画虎还是有很多弊端的，想要真正做好MVC的选择题，必须在项目中不断犯错误，不断修正，才能逐渐走上正轨。我参加的项目主要运用了Yii框架，是目前比较流行的一个Web开发框架。随着前不久，1.1.6版本的发布，我发现Yii框架的文档中，多了一篇MVC最佳实践的文章。我想，这个文章对于初学者来说，应该具备相当的指导性，而且指导相当具体。如果也有跟我相同的迷茫，应该好好钻研一下这篇文章，并且身体力行去验证之，这里给出链接。我在这篇文章中，就是概括简述一下那篇文档的内容。

<span class="readmore"><a href="http://sexywp.com/mvc-best-practice.htm" title="MVC最佳实践">Keep Reading --- 1394 words totally</a></span><table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="86" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="视频教程：使用Yii框架开发Blog" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fvideo-guide-to-use-yii-framework.htm&from=http%3A%2F%2Fsexywp.com%2Fmvc-best-practice.htm">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;" src="http://static.wumii.com/site_images/2011/05/22/9170385.jpg" width="80px" height="80px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">视频教程：使用Yii框架开发Blog</font>
                    </a>
                </td>
                <td width="86" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Yii框架中验证器的allowEmpty属性" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fyii-validator-allwoempty-property.htm&from=http%3A%2F%2Fsexywp.com%2Fmvc-best-practice.htm">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="80px" height="80px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Yii框架中验证器的allowEmpty属性</font>
                    </a>
                </td>
                <td width="86" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Yii框架的Log系统的分析" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fhow-to-use-log-in-yii-framework.htm&from=http%3A%2F%2Fsexywp.com%2Fmvc-best-practice.htm">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;" src="http://static.wumii.com/site_images/2011/05/22/9184865.jpg" width="80px" height="80px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Yii框架的Log系统的分析</font>
                    </a>
                </td>
                <td width="86" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="MVC就是个选择题" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fmvc-chose-where-to-put-your-code.htm&from=http%3A%2F%2Fsexywp.com%2Fmvc-best-practice.htm">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="80px" height="80px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">MVC就是个选择题</font>
                    </a>
                </td>
                <td width="86" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Dedian 5的PHP包缺少readline支持" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Flet-php5-support-readline.htm&from=http%3A%2F%2Fsexywp.com%2Fmvc-best-practice.htm">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="80px" height="80px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Dedian 5的PHP包缺少readline支持</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>前一段日子，写了一篇《<a href="http://sexywp.com/mvc-chose-where-to-put-your-code.htm">MVC就是一个选择题</a>》，重点描述了我对MVC模式的迷惑。随着我对这个模式应用时间的深入，渐渐感到得心应手，这个模式早在30多年前就已经发明了，确实经受了时间的考验，可以说是千锤百炼。但是，实践过程中，我也发现，更多的时候照猫画虎还是有很多弊端的，想要真正做好MVC的选择题，必须在项目中不断犯错误，不断修正，才能逐渐走上正轨。我参加的项目主要运用了Yii框架，是目前比较流行的一个Web开发框架。随着前不久，1.1.6版本的发布，我发现Yii框架的文档中，多了一篇MVC最佳实践的文章。我想，这个文章对于初学者来说，应该具备相当的指导性，而且指导相当具体。如果也有跟我相同的迷茫，应该好好钻研一下这篇文章，并且身体力行去验证之，<a href="http://www.yiiframework.com/doc/guide/1.1/en/basics.best-practices">这里给出链接</a>。我在这篇文章中，就是概括简述一下那篇文档的内容。<span id="more-414"></span></p>
<p>MVC的核心理念是代码的重用和关注点的分离（Separation of concern 我个人对这个理解就是将数据和表现进行分离）。如何正确遵循MVC的原理来编写代码是有一些基本指导原则可以遵循的。为了便于理解后面将要叙述的指导原则，我们这里认为一个典型的Web应用由以下几个子应用（部分）组成：</p>
<ul>
<li>前端——网站界面，面向普通用户</li>
<li>后台——一部分有管理权限的用户用于维护Web应用的正常运转</li>
<li>控制台——在终端中执行的命令，或者是定时任务如cronjob，用于日常运维</li>
<li>API——用于第三方合作，或者二次开发</li>
</ul>
<h3>Model</h3>
<p>模型用于表示底层数据结构，经常在整个应用的不同部分共享，有些模型在前后台、API中都会用到，所以一个模型应该遵循的指导原则有：</p>
<ul>
<li>包含属性用于描述特定的数据</li>
<li>应该包含业务逻辑，以确保数据能够满足表现的需要</li>
<li>应该包含数据操作的代码，比如数据存储、检索</li>
<li>不应该使用$_GET $_POST这样的只有在前端才会出现的数组，在控制台和API用到时候，可能就无法复用了</li>
<li>不应该出现HTML代码，负责表现的代码应该放到view文件中</li>
</ul>
<p>在上述指导原则下，可能会写出非常庞大的Model类（过多数据操作，业务逻辑代码包含其中）。这种情况下，建议进一步抽象，提炼出一个基类，包含最通用的功能，然后前端、后端和API在用到时候，将各个子应用才相关的逻辑放到基类继承出来的子类里面。</p>
<h3>View</h3>
<p>视图主要就用于前端表现的代码。</p>
<ul>
<li>包含HTML，以及所有负责表现的代码，可以出现PHP，但是只用于遍历数据、格式化数据</li>
<li>不应该包含DB请求</li>
<li>不应该出现引用$_GET $_POST这类数组的代码，这应该是Controller的工作。View只是专注于表现，布局等和页面呈现有关的业务，用户的请求数据应该由Controller和Model负责处理</li>
<li>如果必要，可以访问Model和Controller的属性，不过这是为了满足表现的需要</li>
</ul>
<p>可以使用诸如布局、部分视图、HTML Helper类、Widget等框架特性来最大程度重用View的代码。</p>
<h3>Controller</h3>
<p>控制器是将模型、视图和其他组件组装在一起形成一个应用的粘合剂。控制器直接负责处理终端用户的请求。</p>
<ul>
<li>可以访问$_GET $_POST这样的用户请求数组</li>
<li>创建模型，并决定一个模型对象的生命周期</li>
<li>不应该出现SQL语句，数据库请求应该放到Model中</li>
<li>不应该出现HTML代码，而应该将其放入到View中</li>
</ul>
<p>在一个设计良好的MVC应用中，控制器是非常轻量级的，经常只有几十行代码的样子；而Model总是非常复杂而且庞大，包含了所有的用于表现的数据及其操作方法。这是因为由数据结构和业务逻辑组成的模型对每个应用来说，都是独特的，需要大量的定制化工作来满足应用的需求；控制器的逻辑经常遵循一个特定的套路，在各个应用中都差不多，因此可以被框架底层代码极大程度地简化（也就是说不是控制器代码少，而是Web开发框架已经都抽象出来并且都帮你做好了，这也就是框架的价值和能够实现快速开发的原因）。</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="86" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="视频教程：使用Yii框架开发Blog" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fvideo-guide-to-use-yii-framework.htm&from=http%3A%2F%2Fsexywp.com%2Fmvc-best-practice.htm">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;" src="http://static.wumii.com/site_images/2011/05/22/9170385.jpg" width="80px" height="80px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">视频教程：使用Yii框架开发Blog</font>
                    </a>
                </td>
                <td width="86" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Yii框架中验证器的allowEmpty属性" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fyii-validator-allwoempty-property.htm&from=http%3A%2F%2Fsexywp.com%2Fmvc-best-practice.htm">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="80px" height="80px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Yii框架中验证器的allowEmpty属性</font>
                    </a>
                </td>
                <td width="86" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Yii框架的Log系统的分析" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fhow-to-use-log-in-yii-framework.htm&from=http%3A%2F%2Fsexywp.com%2Fmvc-best-practice.htm">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;" src="http://static.wumii.com/site_images/2011/05/22/9184865.jpg" width="80px" height="80px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Yii框架的Log系统的分析</font>
                    </a>
                </td>
                <td width="86" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="MVC就是个选择题" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fmvc-chose-where-to-put-your-code.htm&from=http%3A%2F%2Fsexywp.com%2Fmvc-best-practice.htm">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="80px" height="80px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">MVC就是个选择题</font>
                    </a>
                </td>
                <td width="86" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Dedian 5的PHP包缺少readline支持" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Flet-php5-support-readline.htm&from=http%3A%2F%2Fsexywp.com%2Fmvc-best-practice.htm">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="80px" height="80px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Dedian 5的PHP包缺少readline支持</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>
	标签：<a href="http://sexywp.com/tags/development" title="development" rel="tag">development</a>, <a href="http://sexywp.com/tags/mvc" title="MVC" rel="tag">MVC</a>, <a href="http://sexywp.com/tags/programming" title="programming" rel="tag">programming</a><br />
]]></content:encoded>
			<wfw:commentRss>http://sexywp.com/mvc-best-practice.htm/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>[Tips] PHP中return的用法</title>
		<link>http://sexywp.com/php-return.htm</link>
		<comments>http://sexywp.com/php-return.htm#comments</comments>
		<pubDate>Sat, 27 Nov 2010 03:20:20 +0000</pubDate>
		<dc:creator>Charles</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://sexywp.com/?p=407</guid>
		<description><![CDATA[这两天，Charles研究Yii框架的使用，注意到Yii的配置文件，采用一种写法。如下：

&#160;&#160;/**

&#160; * 注释若干

<span class="readmore"><a href="http://sexywp.com/php-return.htm" title="[Tips] PHP中return的用法">Keep Reading --- 238 words totally</a></span><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fword2007-doesnot-show-pics.htm&from=http%3A%2F%2Fsexywp.com%2Fphp-return.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">[Tips]Word2007中看不到图片</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fhide-admin-bar-use-3-line-code.htm&from=http%3A%2F%2Fsexywp.com%2Fphp-return.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">[WordPress Tips] 教你3行代码隐藏Admin Bar</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fdeprecated-features-in-php-5-3.htm&from=http%3A%2F%2Fsexywp.com%2Fphp-return.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">PHP 5.3.x中弃用的特性 Deprecated</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Flet-php5-support-readline.htm&from=http%3A%2F%2Fsexywp.com%2Fphp-return.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Dedian 5的PHP包缺少readline支持</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fphp5-pass-param-by-ref.htm&from=http%3A%2F%2Fsexywp.com%2Fphp-return.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">【边学边用】PHP5函数参数的按引用传递</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>这两天，Charles研究Yii框架的使用，注意到Yii的配置文件，采用一种写法。如下：</p>
<div class="hl-surround"><div class="hl-main"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li>&nbsp;<span style="color: Gray;">&nbsp;</span><span style="color: #ffa500;">/*</span><span style="color: #ffa500;">*</span></li>
<li><span style="color: #ffa500;">&nbsp; * 注释若干</span></li>
<li><span style="color: #ffa500;">&nbsp; * 以下是一个格式如config.php的文件</span></li>
<li><span style="color: #ffa500;">&nbsp; </span><span style="color: #ffa500;">*/</span></li>
<li><span style="color: Gray;">&nbsp; </span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: Green;">return</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">array</span><span style="color: Olive;">(</span></li>
<li><span style="color: Gray;">&nbsp;&nbsp; &nbsp; </span><span style="color: #8b0000;">'</span><span style="color: Red;">config1</span><span style="color: #8b0000;">'</span><span style="color: Gray;"> =&gt; </span><span style="color: #8b0000;">'</span><span style="color: Red;">some value</span><span style="color: #8b0000;">'</span><span style="color: Gray;">,</span></li>
<li><span style="color: Gray;">&nbsp;&nbsp; &nbsp; </span><span style="color: #8b0000;">'</span><span style="color: Red;">config2</span><span style="color: #8b0000;">'</span><span style="color: Gray;"> =&gt; </span><span style="color: #8b0000;">'</span><span style="color: Red;">some value</span><span style="color: #8b0000;">'</span><span style="color: Gray;">,</span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">?&gt;</span></li></ol></div></div>
<p>在这个文件中，直接就写了一个return，这个用法又一次突破了我的常识。特意查询了一下文档，里面这样描述的：</p>
<blockquote><p>
<strong>return</strong></p>
<p>If called from within a function, the return() statement immediately ends execution of the current function, and returns its argument as the value of the function call. return() will also end the execution of an eval() statement or script file.</p>
<p>If called from the global scope, then execution of the current script file is ended. If the current script file was include()ed or require()ed, then control is passed back to the calling file. Furthermore, if the current script file was include()ed, then the value given to return() will be returned as the value of the include() call. If return() is called from within the main script file, then script execution ends. If the current script file was named by the auto_prepend_file or auto_append_file configuration options in <a href="http://sexywp.com/tags/php" class="st_tag internal_tag" rel="tag" title="标签 PHP 下的日志">php</a>.ini, then that script file&#8217;s execution is ended.
</p></blockquote>
<p>return语句可以终止函数执行那自不必说了，这里还提到了可以终止eval过程的进行，并且如果处于被include的文件中，还能使return的值成为include和require函数的返回值。这样写的好处是，一个语句就可以得到配置项的内容了。</p>
<div class="hl-surround"><div class="hl-main"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li>&nbsp;<span style="color: Gray;">&nbsp;</span><span style="color: #ffa500;">//</span><span style="color: #ffa500;">原来这样写</span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: Green;">require</span><span style="color: Gray;">&nbsp;</span><span style="color: #8b0000;">'</span><span style="color: Red;">./config.php</span><span style="color: #8b0000;">'</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: Green;">function</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">test</span><span style="color: Olive;">(</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp;&nbsp; &nbsp; </span><span style="color: Green;">global</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">$config</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp;&nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">(</span><span style="color: #00008b;">$config</span><span style="color: Olive;">[</span><span style="color: #8b0000;">'</span><span style="color: Red;">a</span><span style="color: #8b0000;">'</span><span style="color: Olive;">]</span><span style="color: Gray;">==</span><span style="color: #8b0000;">'</span><span style="color: Red;">b</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Green;">echo</span><span style="color: Gray;"> </span><span style="color: #8b0000;">'</span><span style="color: Red;">hello</span><span style="color: #8b0000;">'</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; </span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: #ffa500;">//</span><span style="color: #ffa500;">现在</span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: Green;">function</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">test</span><span style="color: Olive;">(</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp;&nbsp; &nbsp; </span><span style="color: #00008b;">$config</span><span style="color: Gray;"> = </span><span style="color: Green;">require</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">./config.php</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp;&nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">(</span><span style="color: #00008b;">$config</span><span style="color: Olive;">[</span><span style="color: #8b0000;">'</span><span style="color: Red;">a</span><span style="color: #8b0000;">'</span><span style="color: Olive;">]</span><span style="color: Gray;">==</span><span style="color: #8b0000;">'</span><span style="color: Red;">b</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Green;">echo</span><span style="color: Gray;"> </span><span style="color: #8b0000;">'</span><span style="color: Red;">hello</span><span style="color: #8b0000;">'</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">?&gt;</span></li></ol></div></div>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fword2007-doesnot-show-pics.htm&from=http%3A%2F%2Fsexywp.com%2Fphp-return.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">[Tips]Word2007中看不到图片</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fhide-admin-bar-use-3-line-code.htm&from=http%3A%2F%2Fsexywp.com%2Fphp-return.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">[WordPress Tips] 教你3行代码隐藏Admin Bar</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fdeprecated-features-in-php-5-3.htm&from=http%3A%2F%2Fsexywp.com%2Fphp-return.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">PHP 5.3.x中弃用的特性 Deprecated</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Flet-php5-support-readline.htm&from=http%3A%2F%2Fsexywp.com%2Fphp-return.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Dedian 5的PHP包缺少readline支持</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fphp5-pass-param-by-ref.htm&from=http%3A%2F%2Fsexywp.com%2Fphp-return.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">【边学边用】PHP5函数参数的按引用传递</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>
	标签：<a href="http://sexywp.com/tags/php" title="PHP" rel="tag">PHP</a>, <a href="http://sexywp.com/tags/tips" title="tips" rel="tag">tips</a><br />
]]></content:encoded>
			<wfw:commentRss>http://sexywp.com/php-return.htm/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Dedian 5的PHP包缺少readline支持</title>
		<link>http://sexywp.com/let-php5-support-readline.htm</link>
		<comments>http://sexywp.com/let-php5-support-readline.htm#comments</comments>
		<pubDate>Fri, 12 Nov 2010 06:33:40 +0000</pubDate>
		<dc:creator>Charles</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[工作相关]]></category>

		<guid isPermaLink="false">http://sexywp.com/?p=404</guid>
		<description><![CDATA[命令行下，PHP有一个很有趣的功能，就是interactive mode，在这种模式下，用户可以使用php shell，很自如的运行各种php函数。只要在shell下执行php -a命令即可。但是这个模式需要readline支持。

在Debian 5下，通过官方源使用apt安装的php5，不支持readline，所以，就无法使用interactive mode了。搜索了下，找到了解决办法。参见：http://www.dotdeb.org/instructions/ 这可能是一个组织，专门支持在Debian下搭建Web服务系统。

<span class="readmore"><a href="http://sexywp.com/let-php5-support-readline.htm" title="Dedian 5的PHP包缺少readline支持">Keep Reading --- 212 words totally</a></span><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fphp5-pass-param-by-ref.htm&from=http%3A%2F%2Fsexywp.com%2Flet-php5-support-readline.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">【边学边用】PHP5函数参数的按引用传递</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fdeprecated-features-in-php-5-3.htm&from=http%3A%2F%2Fsexywp.com%2Flet-php5-support-readline.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">PHP 5.3.x中弃用的特性 Deprecated</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fphp-return.htm&from=http%3A%2F%2Fsexywp.com%2Flet-php5-support-readline.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">[Tips] PHP中return的用法</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fvideo-guide-to-use-yii-framework.htm&from=http%3A%2F%2Fsexywp.com%2Flet-php5-support-readline.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">视频教程：使用Yii框架开发Blog</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Flinux-commands-used-when-working.htm&from=http%3A%2F%2Fsexywp.com%2Flet-php5-support-readline.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">工作中常用的Linux命令集锦</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>命令行下，PHP有一个很有趣的功能，就是interactive mode，在这种模式下，用户可以使用php shell，很自如的运行各种php函数。只要在shell下执行php -a命令即可。但是这个模式需要readline支持。</p>
<p>在Debian 5下，通过官方源使用apt安装的php5，不支持readline，所以，就无法使用interactive mode了。搜索了下，找到了解决办法。参见：http://www.dotdeb.org/instructions/ 这可能是一个组织，专门支持在Debian下搭建Web服务系统。</p>
<p>首先打开source.list，添加两个源：</p>
<p>deb http://packages.dotdeb.org stable all<br />
deb-src http://packages.dotdeb.org stable all</p>
<p>然后update，然后safe-upgrade，会发现跟web server相关的软件包都升级了，包括apache， <a href="http://sexywp.com/tags/php" class="st_tag internal_tag" rel="tag" title="标签 PHP 下的日志">php</a>，mysql等。升级完成后，再尝试php -a，哈哈，<a href="http://sexywp.com/tags/php" class="st_tag internal_tag" rel="tag" title="标签 PHP 下的日志">php</a> shell出来了！！</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fphp5-pass-param-by-ref.htm&from=http%3A%2F%2Fsexywp.com%2Flet-php5-support-readline.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">【边学边用】PHP5函数参数的按引用传递</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fdeprecated-features-in-php-5-3.htm&from=http%3A%2F%2Fsexywp.com%2Flet-php5-support-readline.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">PHP 5.3.x中弃用的特性 Deprecated</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fphp-return.htm&from=http%3A%2F%2Fsexywp.com%2Flet-php5-support-readline.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">[Tips] PHP中return的用法</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fvideo-guide-to-use-yii-framework.htm&from=http%3A%2F%2Fsexywp.com%2Flet-php5-support-readline.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">视频教程：使用Yii框架开发Blog</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Flinux-commands-used-when-working.htm&from=http%3A%2F%2Fsexywp.com%2Flet-php5-support-readline.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">工作中常用的Linux命令集锦</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>该日志未加标签。]]></content:encoded>
			<wfw:commentRss>http://sexywp.com/let-php5-support-readline.htm/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP 5.3.x中弃用的特性 Deprecated</title>
		<link>http://sexywp.com/deprecated-features-in-php-5-3.htm</link>
		<comments>http://sexywp.com/deprecated-features-in-php-5-3.htm#comments</comments>
		<pubDate>Wed, 10 Nov 2010 05:58:01 +0000</pubDate>
		<dc:creator>Charles</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[工作相关]]></category>
		<category><![CDATA[deprecated]]></category>
		<category><![CDATA[features]]></category>

		<guid isPermaLink="false">http://sexywp.com/?p=402</guid>
		<description><![CDATA[今天在服务器上检查PHP的版本，发现了一条提示，说在PHP配置文件中，使用#号作为注释标记是已经被弃用（Deprecated）的特性了。特地去了解了一下这个问题，原来从PHP 5.3.x开始起，有很多特性已经被不建议使用了。

我这里整理了一下我日常工作中会用到的一些，剩下的大家看指南好了。



<span class="readmore"><a href="http://sexywp.com/deprecated-features-in-php-5-3.htm" title="PHP 5.3.x中弃用的特性 Deprecated">Keep Reading --- 232 words totally</a></span><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fphp5-pass-param-by-ref.htm&from=http%3A%2F%2Fsexywp.com%2Fdeprecated-features-in-php-5-3.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">【边学边用】PHP5函数参数的按引用传递</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Flet-php5-support-readline.htm&from=http%3A%2F%2Fsexywp.com%2Fdeprecated-features-in-php-5-3.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Dedian 5的PHP包缺少readline支持</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fphp-return.htm&from=http%3A%2F%2Fsexywp.com%2Fdeprecated-features-in-php-5-3.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">[Tips] PHP中return的用法</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fvideo-guide-to-use-yii-framework.htm&from=http%3A%2F%2Fsexywp.com%2Fdeprecated-features-in-php-5-3.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">视频教程：使用Yii框架开发Blog</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fhow-to-install-phpunit-on-debian.htm&from=http%3A%2F%2Fsexywp.com%2Fdeprecated-features-in-php-5-3.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">如何在Debian上安装PHPUnit</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>今天在服务器上检查PHP的版本，发现了一条提示，说在PHP配置文件中，使用#号作为注释标记是已经被弃用（<a href="http://sexywp.com/tags/deprecated" class="st_tag internal_tag" rel="tag" title="标签 deprecated 下的日志">Deprecated</a>）的特性了。特地去了解了一下这个问题，原来从PHP 5.3.x开始起，有很多特性已经被不建议使用了。</p>
<p>我这里整理了一下我日常工作中会用到的一些，剩下的大家看<a href="http://php.net/manual/en/migration53.deprecated.php">指南</a>好了。</p>
<ul>
<li>配置文件中，#开始的注释语句，可以现在可以使用//来注释，就像在代码里一样</li>
<li>session_register，session_unregister, session_is_registered函数，现在直接操作$_SESSION数组即可</li>
<li>split函数，这个函数可以使用preg_split来替代</li>
<li>使用new创建的对象不再需要使用引用来传递</li>
<li>调用函数时，使用引用传递参数也不推荐使用了</li>
</ul>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fphp5-pass-param-by-ref.htm&from=http%3A%2F%2Fsexywp.com%2Fdeprecated-features-in-php-5-3.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">【边学边用】PHP5函数参数的按引用传递</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Flet-php5-support-readline.htm&from=http%3A%2F%2Fsexywp.com%2Fdeprecated-features-in-php-5-3.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Dedian 5的PHP包缺少readline支持</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fphp-return.htm&from=http%3A%2F%2Fsexywp.com%2Fdeprecated-features-in-php-5-3.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">[Tips] PHP中return的用法</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fvideo-guide-to-use-yii-framework.htm&from=http%3A%2F%2Fsexywp.com%2Fdeprecated-features-in-php-5-3.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">视频教程：使用Yii框架开发Blog</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fhow-to-install-phpunit-on-debian.htm&from=http%3A%2F%2Fsexywp.com%2Fdeprecated-features-in-php-5-3.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">如何在Debian上安装PHPUnit</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>
	标签：<a href="http://sexywp.com/tags/deprecated" title="deprecated" rel="tag">deprecated</a>, <a href="http://sexywp.com/tags/features" title="features" rel="tag">features</a>, <a href="http://sexywp.com/tags/php" title="PHP" rel="tag">PHP</a><br />
]]></content:encoded>
			<wfw:commentRss>http://sexywp.com/deprecated-features-in-php-5-3.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>使用FirePHP辅助AJAX应用开发</title>
		<link>http://sexywp.com/use-firephp-in-ajax-development.htm</link>
		<comments>http://sexywp.com/use-firephp-in-ajax-development.htm#comments</comments>
		<pubDate>Mon, 25 Oct 2010 08:56:00 +0000</pubDate>
		<dc:creator>Charles</dc:creator>
				<category><![CDATA[Firefox]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[develop]]></category>
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://sexywp.com/?p=387</guid>
		<description><![CDATA[FirePHP 一款非常方便强大的PHP、AJAX调试工具，基于Firebug的框架开发，可以算是Firebug的插件。该插件帮助用户将PHP的调试信息展示在Firebug的控制台标签内，而不是直接打印到页面上，这样就避免了在调试页面时破坏了页面的DOM结构。

FirePHP的调试信息主要通过HTTP的Response Headers来发送，所以不会和HTTP的包体混在一起，极大程度地方便了AJAX应用的开发调试，是AJAX开发调试的利器。

全文下载链接

<span class="readmore"><a href="http://sexywp.com/use-firephp-in-ajax-development.htm" title="使用FirePHP辅助AJAX应用开发">Keep Reading --- 168 words totally</a></span><table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="86" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="WordPress 开发资源" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fwordpress-developer-resource.htm&from=http%3A%2F%2Fsexywp.com%2Fuse-firephp-in-ajax-development.htm">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="80px" height="80px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress 开发资源</font>
                    </a>
                </td>
                <td width="86" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="插件开发全攻略(11)---在你的WP插件中使用AJAX" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fhow-to-write-a-wp-plugin-11.htm&from=http%3A%2F%2Fsexywp.com%2Fuse-firephp-in-ajax-development.htm">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="80px" height="80px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">插件开发全攻略(11)---在你的WP插件中使用AJAX</font>
                    </a>
                </td>
                <td width="86" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="使用NetBeans IDE 6.5作为WordPress的开发环境" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fuse-netbeans-to-develop-wp.htm&from=http%3A%2F%2Fsexywp.com%2Fuse-firephp-in-ajax-development.htm">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;" src="http://static.wumii.com/site_images/2011/06/02/10636076.png" width="80px" height="80px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">使用NetBeans IDE 6.5作为WordPress的开发环境</font>
                    </a>
                </td>
                <td width="86" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="怎样增加AJAX的可靠性呢？" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fhow-to-use-ajax-correctly.htm&from=http%3A%2F%2Fsexywp.com%2Fuse-firephp-in-ajax-development.htm">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="80px" height="80px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">怎样增加AJAX的可靠性呢？</font>
                    </a>
                </td>
                <td width="86" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="视频教程：使用Yii框架开发Blog" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fvideo-guide-to-use-yii-framework.htm&from=http%3A%2F%2Fsexywp.com%2Fuse-firephp-in-ajax-development.htm">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;" src="http://static.wumii.com/site_images/2011/05/22/9170385.jpg" width="80px" height="80px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">视频教程：使用Yii框架开发Blog</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>FirePHP 一款非常方便强大的PHP、AJAX调试工具，基于Firebug的框架开发，可以算是Firebug的插件。该插件帮助用户将PHP的调试信息展示在Firebug的控制台标签内，而不是直接打印到页面上，这样就避免了在调试页面时破坏了页面的DOM结构。</p>
<p>FirePHP的调试信息主要通过HTTP的Response Headers来发送，所以不会和HTTP的包体混在一起，极大程度地方便了AJAX应用的开发调试，是AJAX开发调试的利器。</p>
<p><a href="http://download.csdn.net/source/2819249" target="_blank">全文下载链接</a><br />
<a href="http://wenku.baidu.com/view/04f50d2ce2bd960590c6771f.html" target="_blank">百度文库在线阅读</a></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="86" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="WordPress 开发资源" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fwordpress-developer-resource.htm&from=http%3A%2F%2Fsexywp.com%2Fuse-firephp-in-ajax-development.htm">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="80px" height="80px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress 开发资源</font>
                    </a>
                </td>
                <td width="86" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="插件开发全攻略(11)---在你的WP插件中使用AJAX" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fhow-to-write-a-wp-plugin-11.htm&from=http%3A%2F%2Fsexywp.com%2Fuse-firephp-in-ajax-development.htm">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="80px" height="80px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">插件开发全攻略(11)---在你的WP插件中使用AJAX</font>
                    </a>
                </td>
                <td width="86" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="使用NetBeans IDE 6.5作为WordPress的开发环境" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fuse-netbeans-to-develop-wp.htm&from=http%3A%2F%2Fsexywp.com%2Fuse-firephp-in-ajax-development.htm">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;" src="http://static.wumii.com/site_images/2011/06/02/10636076.png" width="80px" height="80px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">使用NetBeans IDE 6.5作为WordPress的开发环境</font>
                    </a>
                </td>
                <td width="86" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="怎样增加AJAX的可靠性呢？" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fhow-to-use-ajax-correctly.htm&from=http%3A%2F%2Fsexywp.com%2Fuse-firephp-in-ajax-development.htm">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="80px" height="80px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">怎样增加AJAX的可靠性呢？</font>
                    </a>
                </td>
                <td width="86" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="视频教程：使用Yii框架开发Blog" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fsexywp.com%2Fvideo-guide-to-use-yii-framework.htm&from=http%3A%2F%2Fsexywp.com%2Fuse-firephp-in-ajax-development.htm">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;" src="http://static.wumii.com/site_images/2011/05/22/9170385.jpg" width="80px" height="80px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">视频教程：使用Yii框架开发Blog</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>
	标签：<a href="http://sexywp.com/tags/ajax" title="ajax" rel="tag">ajax</a>, <a href="http://sexywp.com/tags/develop" title="develop" rel="tag">develop</a>, <a href="http://sexywp.com/tags/development" title="development" rel="tag">development</a>, <a href="http://sexywp.com/tags/php" title="PHP" rel="tag">PHP</a><br />
]]></content:encoded>
			<wfw:commentRss>http://sexywp.com/use-firephp-in-ajax-development.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

