<?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>PHP中文资料库</title>
	<atom:link href="http://blog.donews.com/caiyeah/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.donews.com/caiyeah</link>
	<description>PHP&#124;mySQL&#124;apache&#124;zend</description>
	<lastBuildDate>Sun, 05 Nov 2006 00:51:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>利用单元测试在每个层上对PHP代码进行检查</title>
		<link>http://blog.donews.com/caiyeah/archive/2006/11/05/1072626.aspx</link>
		<comments>http://blog.donews.com/caiyeah/archive/2006/11/05/1072626.aspx#comments</comments>
		<pubDate>Sun, 05 Nov 2006 00:51:00 +0000</pubDate>
		<dc:creator>caiyeahku</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.donews.com/caiyeah/archive/2006/11/05/1072626.aspx</guid>
		<description><![CDATA[<p>&#160;</p>
<p>测试驱动的开发和单元测试是确保代码在经过修改和重大调整之后依然能如我们期望的一样工作的最新方法。在本文中，您将学习到如何在模块、数据库和用户界面（UI）层对自己的 PHP 代码进行单元测试。<br />现在是凌晨 3 点。我们怎样才能知道自己的代码依然在工作呢？</p>
<p>Web 应用程序是 24x7 不间断运行的，因此我的程序是否还在运行这个问题会在晚上一直困扰我。单元测试已经帮我对自己的代码建立了足够的信心 &#8212;&#8212; 这样我就可以安稳地睡个好觉了。</p>
<p>单元测试 是一个为代码编写测试用例并自动运行这些测试的框架。测试驱动的开发是一种单元测试方法，其思想是应该首先编写测试程序，并验证这些测试可以发现错误，然后才开始编写需要通过这些测试的代码。当所有测试都通过时，我们开发的特性也就完成了。这些单元测试的价值是我们可以随时运行它们 &#8212;&#8212; 在签入代码之前，重大修改之后，或者部署到正在运行的系统之后都可以。</p>
<p>PHP 单元测试</p>
<p>对于 PHP 来说，单元测试框架是 P]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p>测试驱动的开发和单元测试是确保代码在经过修改和重大调整之后依然能如我们期望的一样工作的最新方法。在本文中，您将学习到如何在模块、数据库和用户界面（UI）层对自己的 PHP 代码进行单元测试。<br />现在是凌晨 3 点。我们怎样才能知道自己的代码依然在工作呢？</p>
<p>Web 应用程序是 24&#215;7 不间断运行的，因此我的程序是否还在运行这个问题会在晚上一直困扰我。单元测试已经帮我对自己的代码建立了足够的信心 &mdash;&mdash; 这样我就可以安稳地睡个好觉了。</p>
<p>单元测试 是一个为代码编写测试用例并自动运行这些测试的框架。测试驱动的开发是一种单元测试方法，其思想是应该首先编写测试程序，并验证这些测试可以发现错误，然后才开始编写需要通过这些测试的代码。当所有测试都通过时，我们开发的特性也就完成了。这些单元测试的价值是我们可以随时运行它们 &mdash;&mdash; 在签入代码之前，重大修改之后，或者部署到正在运行的系统之后都可以。</p>
<p>PHP 单元测试</p>
<p>对于 PHP 来说，单元测试框架是 PHPUnit2。可以使用 PEAR 命令行作为一个 PEAR 模块来安装这个系统：% pear install PHPUnit2。</p>
<p>在安装这个框架之后，可以通过创建派生于 PHPUnit2_Framework_TestCase 的测试类来编写单元测试。</p>
<p>模块单元测试</p>
<p>我发现开始单元测试最好的地方是在应用程序的业务逻辑模块中。我使用了一个简单的例子：这是一个对两个数字进行求和的函数。为了开始测试，我们首先编写测试用例，如下所示。</p>
<p>清单 1. TestAdd.php</p>
<p>&lt;?php<br />require_once &#8216;Add.php&#8217;;<br />require_once &#8216;PHPUnit2/Framework/TestCase.php&#8217;;</p>
<p>class TestAdd extends PHPUnit2_Framework_TestCase<br />{<br />&nbsp; function test1() { $this-&gt;assertTrue( add( 1, 2 ) == 3 ); }<br />&nbsp; function test2() { $this-&gt;assertTrue( add( 1, 1 ) == 2 ); }<br />}<br />?&gt;<br />&nbsp;</p>
<p>这个 TestAdd 类有两个方法，都使用了 test 前缀。每个方法都定义了一个测试，这个测试可以与清单 1 一样简单，也可以十分复杂。在本例中，我们在第一个测试中只是简单地断定 1 加 2 等于 3，在第二个测试中是 1 加 1 等于 2。</p>
<p>PHPUnit2 系统定义了 assertTrue() 方法，它用来测试参数中包含的条件值是否为真。然后，我们又编写了 Add.php 模块，最初让它产生错误的结果。</p>
<p>清单 2. Add.php</p>
<p>&lt;?php<br />function add( $a, $b ) { return 0; }<br />?&gt;</p>
<p>现在运行单元测试时，这两个测试都会失败。</p>
<p>清单 3. 测试失败</p>
<p>% phpunit TestAdd.php<br />PHPUnit 2.2.1 by Sebastian Bergmann.</p>
<p>FF</p>
<p>Time: 0.0031270980834961<br />There were 2 failures:<br />1) test1(TestAdd)</p>
<p>2) test2(TestAdd)</p>
<p>FAILURES!!!<br />Tests run: 2, Failures: 2, Errors: 0, Incomplete Tests: 0.<br />&nbsp;</p>
<p>现在我知道这两个测试都可以正常工作了。因此，可以修改 add() 函数来真正地做实际的事情了。</p>
<p>&lt;?php<br />function add( $a, $b ) { return $a+$b; }<br />?&gt;<br />&nbsp;</p>
<p>现在这两个测试都可以通过了。</p>
<p>清单 4. 测试通过</p>
<p>% phpunit TestAdd.php<br />PHPUnit 2.2.1 by Sebastian Bergmann.</p>
<p>..</p>
<p>Time: 0.0023679733276367</p>
<p>OK (2 tests)<br />%</p>
<p>尽管这个测试驱动开发的例子非常简单，但是我们可以从中体会到它的思想。我们首先创建了测试用例，并且有足够多的代码让这个测试运行起来，不过结果是错误的。然后我们验证测试的确是失败的，接着实现了实际的代码使这个测试能够通过。</p>
<p>我发现在实现代码时我会一直不断地添加代码，直到拥有一个覆盖所有代码路径的完整测试为止。在本文的最后，您会看到有关编写什么测试和如何编写这些测试的一些建议。</p>
<p>数据库测试</p>
<p>在进行模块测试之后，就可以进行数据库访问测试了。数据库访问测试带来了两个有趣的问题。首先，我们必须在每次测试之前将数据库恢复到某个已知点。其次，要注意这种恢复可能会对现有数据库造成破坏，因此我们必须对非生产数据库进行测试，或者在编写测试用例时注意不能影响现有数据库的内容。</p>
<p>数据库的单元测试是从数据库开始的。为了阐述这个问题，我们需要使用下面的简单模式。</p>
<p>清单 5. Schema.sql</p>
<p>DROP TABLE IF EXISTS authors;<br />CREATE TABLE authors (<br />&nbsp; id MEDIUMINT NOT NULL AUTO_INCREMENT,<br />&nbsp; name TEXT NOT NULL,<br />&nbsp; PRIMARY KEY ( id )<br />);<br />&nbsp;</p>
<p>清单 5 是一个 authors 表，每条记录都有一个相关的 ID。</p>
<p>接下来，就可以编写测试用例了。</p>
<p>清单 6. TestAuthors.php</p>
<p>&lt;?php<br />require_once &#8216;dblib.php&#8217;;<br />require_once &#8216;PHPUnit2/Framework/TestCase.php&#8217;;</p>
<p>class TestAuthors extends PHPUnit2_Framework_TestCase<br />{<br />&nbsp; function test_delete_all() {<br />&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;assertTrue( Authors::delete_all() );<br />&nbsp; }<br />&nbsp; function test_insert() {<br />&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;assertTrue( Authors::delete_all() );<br />&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;assertTrue( Authors::insert( &#8216;Jack&#8217; ) );<br />&nbsp; }<br />&nbsp; function test_insert_and_get() {<br />&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;assertTrue( Authors::delete_all() );<br />&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;assertTrue( Authors::insert( &#8216;Jack&#8217; ) );<br />&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;assertTrue( Authors::insert( &#8216;Joe&#8217; ) );<br />&nbsp;&nbsp;&nbsp;&nbsp; $found = Authors::get_all();<br />&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;assertTrue( $found != null );<br />&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;assertTrue( count( $found ) == 2 );<br />&nbsp; }<br />}<br />?&gt;<br />&nbsp;</p>
<p>这组测试覆盖了从表中删除作者、向表中插入作者以及在验证作者是否存在的同时插入作者等功能。这是一个累加的测试，我发现对于寻找错误来说这非常有用。观察一下哪些测试可以正常工作，而哪些测试不能正常工作，就可以快速地找出哪些地方出错了，然后就可以进一步理解它们之间的区别。</p>
<p>最初产生失败的 dblib.php PHP 数据库访问代码版本如下所示。</p>
<p>清单 7. dblib.php</p>
<p>&lt;?php<br />require_once(&#8216;DB.php&#8217;);</p>
<p>class Authors<br />{<br />&nbsp; public static function get_db()<br />&nbsp; {<br />&nbsp;&nbsp;&nbsp; $dsn = &#8216;mysql://root:password@localhost/unitdb&#8217;;<br />&nbsp;&nbsp;&nbsp; $db =&amp; DB::Connect( $dsn, array() );<br />&nbsp;&nbsp;&nbsp; if (PEAR::isError($db)) { die($db-&gt;getMessage()); }<br />&nbsp;&nbsp;&nbsp; return $db;<br />&nbsp; }<br />&nbsp; public static function delete_all()<br />&nbsp; {<br />&nbsp;&nbsp;&nbsp; return false;<br />&nbsp; }<br />&nbsp; public static function insert( $name )<br />&nbsp; {<br />&nbsp;&nbsp;&nbsp; return false;<br />&nbsp; }<br />&nbsp; public static function get_all()<br />&nbsp; {<br />&nbsp;&nbsp;&nbsp; return null;<br />&nbsp; }<br />}<br />?&gt;</p>
<p>对清单 8 中的代码执行单元测试会显示这 3 个测试全部失败了：</p>
<p>清单 8. dblib.php</p>
<p>% phpunit TestAuthors.php<br />PHPUnit 2.2.1 by Sebastian Bergmann.</p>
<p>FFF</p>
<p>Time: 0.007500171661377<br />There were 3 failures:<br />1) test_delete_all(TestAuthors)</p>
<p>2) test_insert(TestAuthors)</p>
<p>3) test_insert_and_get(TestAuthors)</p>
<p>FAILURES!!!<br />Tests run: 3, Failures: 3, Errors: 0, Incomplete Tests: 0.<br />%<br />&nbsp;</p>
<p>现在我们可以开始添加正确访问数据库的代码 &mdash;&mdash; 一个方法一个方法地添加 &mdash;&mdash; 直到所有这 3 个测试都可以通过。最终版本的 dblib.php 代码如下所示。</p>
<p>清单 9. 完整的 dblib.php</p>
<p>&lt;?php<br />require_once(&#8216;DB.php&#8217;);</p>
<p>class Authors<br />{<br />&nbsp; public static function get_db()<br />&nbsp; {<br />&nbsp;&nbsp;&nbsp; $dsn = &#8216;mysql://root:password@localhost/unitdb&#8217;;<br />&nbsp;&nbsp;&nbsp; $db =&amp; DB::Connect( $dsn, array() );<br />&nbsp;&nbsp;&nbsp; if (PEAR::isError($db)) { die($db-&gt;getMessage()); }<br />&nbsp;&nbsp;&nbsp; return $db;<br />&nbsp; }<br />&nbsp; public static function delete_all()<br />&nbsp; {<br />&nbsp;&nbsp;&nbsp; $db = Authors::get_db();<br />&nbsp;&nbsp;&nbsp; $sth = $db-&gt;prepare( &#8216;DELETE FROM authors&#8217; );<br />&nbsp;&nbsp;&nbsp; $db-&gt;execute( $sth );<br />&nbsp;&nbsp;&nbsp; return true;<br />&nbsp; }<br />&nbsp; public static function insert( $name )<br />&nbsp; {<br />&nbsp;&nbsp;&nbsp; $db = Authors::get_db();<br />&nbsp;&nbsp;&nbsp; $sth = $db-&gt;prepare( &#8216;INSERT INTO authors VALUES (null,?)&#8217; );<br />&nbsp;&nbsp;&nbsp; $db-&gt;execute( $sth, array( $name ) );<br />&nbsp;&nbsp;&nbsp; return true;<br />&nbsp; }<br />&nbsp; public static function get_all()<br />&nbsp; {<br />&nbsp;&nbsp;&nbsp; $db = Authors::get_db();<br />&nbsp;&nbsp;&nbsp; $res = $db-&gt;query( &quot;SELECT * FROM authors&quot; );<br />&nbsp;&nbsp;&nbsp; $rows = array();<br />&nbsp;&nbsp;&nbsp; while( $res-&gt;fetchInto( $row ) ) { $rows []= $row; }<br />&nbsp;&nbsp;&nbsp; return $rows;<br />&nbsp; }<br />}<br />?&gt;<br />&nbsp;</p>
<p>在对这段代码运行测试时，所有的测试都可以没有问题地运行，这样我们就可以知道自己的代码可以正确工作了。</p>
<p>HTML 测试</p>
<p>对整个 PHP 应用程序进行测试的下一个步骤是对前端的超文本标记语言（HTML）界面进行测试。要进行这种测试，我们需要一个如下所示的 Web 页面。</p>
<p>这个页面对两个数字进行求和。为了对这个页面进行测试，我们首先从单元测试代码开始入手。</p>
<p>清单 10. TestPage.php</p>
<p>&lt;?php<br />require_once &#8216;HTTP/Client.php&#8217;;<br />require_once &#8216;PHPUnit2/Framework/TestCase.php&#8217;;</p>
<p>class TestPage extends PHPUnit2_Framework_TestCase<br />{<br />&nbsp; function get_page( $url )<br />&nbsp; {<br />&nbsp;&nbsp;&nbsp; $client = new HTTP_Client();<br />&nbsp;&nbsp;&nbsp; $client-&gt;get( $url );<br />&nbsp;&nbsp;&nbsp; $resp = $client-&gt;currentResponse();<br />&nbsp;&nbsp;&nbsp; return $resp['body'];<br />&nbsp; }<br />&nbsp; function test_get()<br />&nbsp; {<br />&nbsp;&nbsp;&nbsp; $page = TestPage::get_page( &#8216;http://localhost/unit/add.php&#8217; );<br />&nbsp;&nbsp;&nbsp; $this-&gt;assertTrue( strlen( $page ) &gt; 0 );<br />&nbsp;&nbsp;&nbsp; $this-&gt;assertTrue( preg_match( &#8216;/&lt;html&gt;/&#8217;, $page ) == 1 );<br />&nbsp; }<br />&nbsp; function test_add()<br />&nbsp; {<br />&nbsp;&nbsp;&nbsp; $page = TestPage::get_page( &#8216;http://localhost/unit/add.php?a=10&amp;b=20&#8242; );<br />&nbsp;&nbsp;&nbsp; $this-&gt;assertTrue( strlen( $page ) &gt; 0 );<br />&nbsp;&nbsp;&nbsp; $this-&gt;assertTrue( preg_match( &#8216;/&lt;html&gt;/&#8217;, $page ) == 1 );<br />&nbsp;&nbsp;&nbsp; preg_match( &#8216;/&lt;span id=&quot;result&quot;&gt;(.*?)&lt;\/span&gt;/&#8217;, $page, $out );<br />&nbsp;&nbsp;&nbsp; $this-&gt;assertTrue( $out[1]==&#8217;30&#8242; );<br />&nbsp; }<br />}<br />?&gt;<br />&nbsp;</p>
<p>这个测试使用了 PEAR 提供的 HTTP Client 模块。我发现它比内嵌的 PHP Client URL Library（CURL）更简单一点儿，不过也可以使用后者。</p>
<p>有一个测试会检查所返回的页面，并判断这个页面是否包含 HTML。第二个测试会通过将值放到请求的 URL 中来请求计算 10 和 20 的和，然后检查返回的页面中的结果。</p>
<p>这个页面的代码如下所示。</p>
<p>清单 11. TestPage.php</p>
<p>&lt;html&gt;&lt;body&gt;&lt;form&gt;<br />&lt;input type=&quot;text&quot; name=&quot;a&quot; value=&quot;&lt;?php echo($_REQUEST['a']); ?&gt;&quot; /&gt; +<br />&lt;input type=&quot;text&quot; name=&quot;b&quot; value=&quot;&lt;?php echo($_REQUEST['b']); ?&gt;&quot; /&gt; =<br />&lt;span id=&quot;result&quot;&gt;&lt;?php echo($_REQUEST['a']+$_REQUEST['b']); ?&gt;&lt;/span&gt;<br />&lt;br/&gt;<br />&lt;input type=&quot;submit&quot; value=&quot;Add&quot; /&gt;<br />&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;<br />&nbsp;</p>
<p>这个页面相当简单。两个输入域显示了请求中提供的当前值。结果 span 显示了这两个值的和。&lt;span&gt; 标记标出了所有区别：它对于用户来说是不可见的，但是对于单元测试来说却是可见的。因此单元测试并不需要复杂的逻辑来找到这个值。相反，它会检索一个特定 &lt;span&gt; 标记的值。这样当界面发生变化时，只要 span 存在，测试就可以通过。</p>
<p>与前面一样，首先编写测试用例，然后创建一个失败版本的页面。我们对失败情况进行测试，然后修改页面的内容使其可以工作。结果如下：</p>
<p>清单 12. 测试失败情况，然后修改页面</p>
<p>% phpunit TestPage.php<br />PHPUnit 2.2.1 by Sebastian Bergmann.</p>
<p>..</p>
<p>Time: 0.25711488723755</p>
<p>OK (2 tests)<br />%<br />&nbsp;</p>
<p>这两个测试都可以通过，这就意味着测试代码可以正常工作。</p>
<p>不过对 HTML 前端的测试有一个缺陷：JavaScript。超文本传输协议（HTTP）客户机代码对页面进行检索，但是却没有执行 JavaScript。因此如果我们在 JavaScript 中有很多代码，就必须创建用户代理级的单元测试。我发现实现这种功能的最佳方法是使用 Microsoft&reg; Internet Explorer&reg; 内嵌的自动化层功能。通过使用 PHP 编写的 Microsoft Windows&reg; 脚本，可以使用组件对象模型（COM）接口来控制 Internet Explorer，让它在页面之间进行导航，然后使用文档对象模型（DOM）方法在执行特定用户操作之后查找页面中的元素。</p>
<p>这是我了解的对前端 JavaScript 代码进行单元测试的惟一一种方法。我承认它并不容易编写和维护，这些测试即使在对页面稍微进行改动时也很容易遭到破坏。</p>
<p>编写哪些测试以及如何编写这些测试</p>
<p>在编写测试时，我喜欢覆盖以下情况：</p>
<p>所有正面测试<br />这组测试可以确保所有的东西都如我们期望的一样工作。<br />所有负面测试<br />逐一使用这些测试，从而确保每个失效或异常情况都被测试到了。<br />正面序列测试<br />这组测试可以确保按照正确顺序的调用可以像我们期望的一样工作。<br />负面序列测试<br />这组测试可以确保当不按正确顺序进行调用时就会失败。<br />负载测试<br />在适当情况下，可以执行一小组测试来确定这些测试的性能在我们期望的范围之内。例如，2,000 次调用应该在 2 秒之内完成。<br />资源测试<br />这些测试确保应用编程接口（API）可以正确地分配并释放资源 &mdash;&mdash; 例如，连续几次调用打开、写入以及关闭基于文件的 API，从而确保没有文件依然是被打开的。<br />回调测试<br />对于具有回调方法的 API 来说，这些测试可以确保如果没有定义回调函数，代码可以正常运行。另外，这些测试还可以确保在定义了回调函数但是这些回调函数操作有误或产生异常时，代码依然可以正常运行。<br />这是有关单元测试的几点想法。有关如何编写单元测试，我也有几点建议：</p>
<p>不要使用随机数据<br />尽管在一个界面中产生随机数据看起来貌似一个好主意，但是我们要避免这样做，因为这些数据会变得非常难以调试。如果数据是在每次调用时随机生成的，那么就可能产生一次测试时出现了错误而另外一次测试却没有出现错误的情况。如果测试需要随机数据，可以在一个文件中生成这些数据，然后每次运行时都使用这个文件。采用这种方法，我们就获得了一些 &ldquo;噪音&rdquo; 数据，但是仍然可以对错误进行调试。<br />分组测试<br />我们很容易累积起数千个测试，需要几个小时才能执行完。这没什么问题，但是对这些测试进行分组使我们可以快速运行某组测试并对主要关注的问题进行检查，然后晚上运行完整的测试。<br />编写稳健的 API 和稳健的测试<br />编写 API 和测试时要注意它们不能在增加新功能或修改现有功能时很容易就会崩溃，这一点非常重要。这里没有通用的绝招，但是有一条准则是那些 &ldquo;振荡的&rdquo; 测试（一会儿失败，一会儿成功，反复不停的测试）应该很快地丢弃。</p>
<p>结束语</p>
<p>单元测试对于工程师来说意义重大。它们是敏捷开发过程（这个过程非常强调编码的作用，因为文档需要一些证据证明代码是按照规范进行工作的）的一个基础。单元测试就提供了这种证据。这个过程从单元测试开始入手，这定义了代码应该 实现但目前尚未实现的功能。因此，所有的测试最初都会失败。然后当代码接近完成时，测试就通过了。当所有测试全部通过时，代码也就变得非常完善了。</p>
<p>我从来没有在不使用单元测试的情况下编写大型代码或修改大型或复杂的代码块。我通常都是在修改代码之前就为现有代码编写了单元测试，这样可以确保自己清楚在修改代码时破坏了什么（或者没有破坏什么）。这为我对自己提供给客户的代码提供了很大的信心，相信它们正在正确运行 &mdash;&mdash; 即便是在凌晨 3 点。</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.donews.com/caiyeah/archive/2006/11/05/1072626.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>各大搜索引擎对 UTF-8 GBK Unicode 的支持情况，百度最差劲！</title>
		<link>http://blog.donews.com/caiyeah/archive/2006/01/22/704549.aspx</link>
		<comments>http://blog.donews.com/caiyeah/archive/2006/01/22/704549.aspx#comments</comments>
		<pubDate>Sun, 22 Jan 2006 06:30:00 +0000</pubDate>
		<dc:creator>caiyeahku</dc:creator>
				<category><![CDATA[杂项]]></category>

		<guid isPermaLink="false">http://blog.donews.com/caiyeah/archive/2006/01/22/704549.aspx</guid>
		<description><![CDATA[Google对国际化的支持度最高！不愧为搜索引擎的老大^_^.不过它对Unicode还是不行。

Yahoo居然不能支持GBK?！实际跟它的参数ei=UTF-8有关，如果改为ei=gb2312，则显示正常。即使在www.yahoo.com搜索，也存在这个问题。在这点他比不上Google的自动检测技术了。很明显，雅虎中国继承了杨致远的技术，却还未消化掉，本土化还不行。

对于UTF-8的支持，本土的搜索引擎新浪和百度都不行。]]></description>
			<content:encoded><![CDATA[<p>作者：<a href="http://caiyeahku.anyp.cn/blog/archive/476644/060121220030062.aspx">caiyeahku</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 转载请挂上我的烂名和地址^_^</p>
<p>从<a class="post_top" href="http://caiyeahku.anyp.cn/060116090454031.aspx" target="_self">中文字符集编码列表[GBK.UTF-8.unicode对应表]</a>查询出<font color="#ff3300">美</font>的编码。</p>
<p>
<table>
<tbody>
<tr>
<td>美</td>
<td></td>
</tr>
<tr>
<td>UTF-8 </td>
<td>%E7%BE%8E</td>
</tr>
<tr>
<td>GBK </td>
<td>%C3%C0</td>
</tr>
<tr>
<td>Unicode</td>
<td>%u7F8E</td>
</tr>
</tbody>
</table>
<p>以<strong>美</strong>字为例进行测试。</p>
<h4>各大搜索引擎的接口</h4>
<p>
<table>
<tbody>
<tr>
<td>http://www.google.com/search?hl=zh-CN&amp;q=</td>
</tr>
<tr>
<td>http://www.yahoo.com.cn/search?ei=UTF-8&amp;p=</td>
</tr>
<tr>
<td>http://www.baidu.com/s?wd=</td>
</tr>
<tr>
<td>http://www.iask.com/s?k=</td>
</tr>
</tbody>
</table>
<p>将上面<font color="#ff0000">美</font>关键字的各自编码放置各大搜索引擎进行测试。</p>
<h4>显示结果</h4>
<p>
<table>
<tbody>
<tr>
<td></td>
<td>UTF-8</td>
<td>GBK</td>
<td>Unicode</td>
</tr>
<tr>
<td>google</td>
<td>美</td>
<td>美</td>
<td>%u7F8E</td>
</tr>
<tr>
<td>yahoo</td>
<td>美</td>
<td>&Agrave;</td>
<td>%u7F8E</td>
</tr>
<tr>
<td>sina</td>
<td>缇</td>
<td>美</td>
<td>%u7F8E</td>
</tr>
<tr>
<td>baidu</td>
<td>缇</td>
<td>美</td>
<td>鏔8E</td>
</tr>
</tbody>
</table>
<p>Google对国际化的支持度最高！不愧为搜索引擎的老大^_^.不过它对Unicode还是不行。</p>
<p>Yahoo居然不能支持GBK?！实际跟它的参数ei=UTF-8有关，如果改为ei=gb2312，则显示正常。即使在<a href="http://www.yahoo.com/">www.yahoo.com</a>搜索，也存在这个问题。在这点他比不上Google的自动检测技术了。很明显，雅虎中国继承了杨致远的技术，却还未消化掉，本土化还不行。</p>
<p>对于UTF-8的支持，本土的搜索引擎新浪和百度都不行，也许跟他们只是面向中国用户有关，但出现在百度身上就不应该了。百度已经在美国上市了，至少得面向美国的股东，人家使用UTF-8编码的中文搜索，却出现乱七八糟的东西，多尴尬啊，哈哈哈哈，想到这点我就忍不住笑了^_^。还号称<strong><font color="#ff3300">全球最大中文搜索引擎</font></strong>呢，真够讽刺。至于Unicode就更不用说了，新浪还好过它。</p>
<pre>         美                缇
UTF-8   %E7%BE%8E      %E7%BC%87
GBK     %C3%C0         %E7%BE
Unicode %u7F8E         %u7F07
</pre>
<p>如果使用[美]的UTF-8的编码%E7%BE%8E 到 百度进行搜索，<a href="http://www.baidu.com/s?wd=%E7%BE%8E">试一下</a>，你会发现百度搜索出[缇]，而非[美]，从上面的编码表比较可以看出，百度将UTF-8的编码<strong>%E7%BE</strong><font color="#ff3333">%8E</font> 的%8E 截掉了，实际是%E7%BE，而<strong>%E7%BE</strong>正是[缇]的GBK编码！</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.donews.com/caiyeah/archive/2006/01/22/704549.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google启用中国的www.google.cn域名</title>
		<link>http://blog.donews.com/caiyeah/archive/2005/12/22/666785.aspx</link>
		<comments>http://blog.donews.com/caiyeah/archive/2005/12/22/666785.aspx#comments</comments>
		<pubDate>Thu, 22 Dec 2005 01:27:00 +0000</pubDate>
		<dc:creator>caiyeahku</dc:creator>
				<category><![CDATA[新闻news]]></category>

		<guid isPermaLink="false">http://blog.donews.com/caiyeah/archive/2005/12/22/666785.aspx</guid>
		<description><![CDATA[<a><img style="BORDER-LEFT-COLOR: #000000; BORDER-BOTTOM-COLOR: #000000; BORDER-TOP-COLOR: #000000; BORDER-RIGHT-COLOR: #000000" src="http://www.cnmobile.com.cn/blog/uploadfile/2005122292520769.PNG" border="0" alt=""/>　</a>]]></description>
			<content:encoded><![CDATA[<p><a><img style="BORDER-LEFT-COLOR: #000000; BORDER-BOTTOM-COLOR: #000000; BORDER-TOP-COLOR: #000000; BORDER-RIGHT-COLOR: #000000" src="http://www.cnmobile.com.cn/blog/uploadfile/2005122292520769.PNG" border="0" alt=""/>　</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.donews.com/caiyeah/archive/2005/12/22/666785.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL error 1064 的错误根源</title>
		<link>http://blog.donews.com/caiyeah/archive/2005/12/18/662519.aspx</link>
		<comments>http://blog.donews.com/caiyeah/archive/2005/12/18/662519.aspx#comments</comments>
		<pubDate>Sun, 18 Dec 2005 08:47:00 +0000</pubDate>
		<dc:creator>caiyeahku</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://blog.donews.com/caiyeah/archive/2005/12/18/662519.aspx</guid>
		<description><![CDATA[今天安装tikiwiki，发现有个功能不能安装Command: &#160; CREATE TABLE tiki_articles (&#160; articleId int(8) NOT NULL auto_increment,&#160; topline varchar(255) default NULL,&#160; title varchar(80) default NULL,&#160; subtitle varchar(255) default NULL,&#160; linkto varchar(255) default NULL,&#160; lang varchar(16) default NULL,&#160; state char(1) default 's',&#160; authorName varchar(60) default NULL,&#160; topicI]]></description>
			<content:encoded><![CDATA[<p>今天安装<a href="http://www.tikiwiki.org">tikiwiki</a>，发现有个功能不能安装</p>
<p>Command: <br/>&nbsp; CREATE TABLE tiki_articles (<br/>&nbsp; articleId int(8) NOT NULL auto_increment,<br/>&nbsp; topline varchar(255) default NULL,<br/>&nbsp; title varchar(80) default NULL,<br/>&nbsp; subtitle varchar(255) default NULL,<br/>&nbsp; linkto varchar(255) default NULL,<br/>&nbsp; lang varchar(16) default NULL,<br/>&nbsp; state char(1) default &#8217;s&#8217;,<br/>&nbsp; authorName varchar(60) default NULL,<br/>&nbsp; topicId int(14) default NULL,<br/>&nbsp; topicName varchar(40) default NULL,<br/>&nbsp; size int(12) default NULL,<br/>&nbsp; useImage char(1) default NULL,<br/>&nbsp; image_name varchar(80) default NULL,<br/>&nbsp; image_caption text default NULL,<br/>&nbsp; image_type varchar(80) default NULL,<br/>&nbsp; image_size int(14) default NULL,<br/>&nbsp; image_x int(4) default NULL,<br/>&nbsp; image_y int(4) default NULL,<br/>&nbsp; image_data longblob,<br/>&nbsp; publishDate int(14) default NULL,<br/>&nbsp; expireDate int(14) default NULL,<br/>&nbsp; created int(14) default NULL,<br/>&nbsp; heading text,<br/>&nbsp; body text,<br/>&nbsp; hash varchar(32) default NULL,<br/>&nbsp; author varchar(200) default NULL,<br/>&nbsp; <strong><font color="#ff0000">reads </font></strong>int(14) default NULL,<br/>&nbsp; votes int(8) default NULL,<br/>&nbsp; points int(14) default NULL,<br/>&nbsp; type varchar(50) default NULL,<br/>&nbsp; rating decimal(3,2) default NULL,<br/>&nbsp; isfloat char(1) default NULL,<br/>&nbsp; PRIMARY KEY&nbsp; (articleId),<br/>&nbsp; KEY title (title),<br/>&nbsp; KEY heading (heading(255)),<br/>&nbsp; KEY body (body(255)),<br/>&nbsp; KEY reads (reads),<br/>&nbsp; KEY author (author(32)),<br/>&nbsp; FULLTEXT KEY ft (title,heading,body)<br/>) <br/>TYPE=MyISAM AUTO_INCREMENT=1 </p>
<p>Message: You have an error in your SQL syntax; <br/>check the manual that corresponds to your MySQL server version for the right syntax to use near &#8216;reads int(14) default NULL,<br/>&nbsp; votes int(8) default NULL,<br/>&nbsp; points int(14) default&#8217; at line 28</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>在google搜索，找不到答案。再看它的错误提示：your MySQL server version for the right syntax to use 。我的MySQL版本是<font color="#ff0000">5.0.15</font>。会不会是版本太高？查找5.0的MySQL文档发现：字段<strong><font color="#ff0000">reads </font></strong>居然是保护词组（reserved-words），见<a href="http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html">http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html</a>。晕倒！</p>
<p>所以设计数据库应注意自己命名的table或字段是否跟mysql冲突，以免出现莫名其妙的错误。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.donews.com/caiyeah/archive/2005/12/18/662519.aspx/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHPeclipse,使用eclipse框架开发的PHP IDE</title>
		<link>http://blog.donews.com/caiyeah/archive/2005/12/10/653404.aspx</link>
		<comments>http://blog.donews.com/caiyeah/archive/2005/12/10/653404.aspx#comments</comments>
		<pubDate>Sat, 10 Dec 2005 07:01:00 +0000</pubDate>
		<dc:creator>caiyeahku</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.donews.com/caiyeah/archive/2005/12/10/653404.aspx</guid>
		<description><![CDATA[<p><a href="http://www.phpeclipse.net">http://www.phpeclipse.net</a></p><p>目前尚处于CVS中.....</p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.phpeclipse.net">http://www.phpeclipse.net</a></p>
<p>目前尚处于CVS中&#8230;..</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.donews.com/caiyeah/archive/2005/12/10/653404.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TikiWiki &#8212;专业的 PHP CMS管理系统</title>
		<link>http://blog.donews.com/caiyeah/archive/2005/12/10/653401.aspx</link>
		<comments>http://blog.donews.com/caiyeah/archive/2005/12/10/653401.aspx#comments</comments>
		<pubDate>Sat, 10 Dec 2005 06:56:00 +0000</pubDate>
		<dc:creator>caiyeahku</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.donews.com/caiyeah/archive/2005/12/10/653401.aspx</guid>
		<description><![CDATA[<p>Tiki 内容管理（CMS）/群件（Groupware），全称 TikiWiki。她是一个功能强大、基于Web方式的群件系统和内容管理系统。TikiWiki采用<a class="wiki external" href="http://php.net/" target="_blank">PHP</a><img class="externallink" alt="external link" src="http://tikiwiki.org.cn/img/icons/external_link.gif" border="0"/>、 <a class="wiki external" href="http://adodb.sourceforge.net/" target="_blank">ADOdb</a><img class="externallink" alt="external link" src="http://tikiwiki.org.cn/img/icons/external_link.gif" border="0"/>以及<a class="wiki external" ]]></description>
			<content:encoded><![CDATA[<p>Tiki 内容管理（CMS）/群件（Groupware），全称 TikiWiki。她是一个功能强大、基于Web方式的群件系统和内容管理系统。TikiWiki采用<a class="wiki external" href="http://php.net/" target="_blank">PHP</a><img class="externallink" alt="external link" src="http://tikiwiki.org.cn/img/icons/external_link.gif" border="0"/>、 <a class="wiki external" href="http://adodb.sourceforge.net/" target="_blank">ADOdb</a><img class="externallink" alt="external link" src="http://tikiwiki.org.cn/img/icons/external_link.gif" border="0"/>以及<a class="wiki external" href="http://smarty.php.net/" target="_blank">smarty</a><img class="externallink" alt="external link" src="http://tikiwiki.org.cn/img/icons/external_link.gif" border="0"/> 技术开发完成。Tiki 可以被用来创建各种类型的Web应用、网站及门户。Tiki是由 <a class="wiki" title="无描述" href="http://tikiwiki.org.cn/tiki-index.php?page=TikiWiki">TikiWiki</a> Community －－Tiki社区共同开发并维护的.<br/></p>
<p><a class="wiki" title="无描述" href="http://tikiwiki.org.cn/tiki-index.php?page=TikiWiki"><font color="#002c99">TikiWiki</font></a> 中文站</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.donews.com/caiyeah/archive/2005/12/10/653401.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>一个专门收集测评PHP编辑器的网站[PHP IDE]</title>
		<link>http://blog.donews.com/caiyeah/archive/2005/12/09/652798.aspx</link>
		<comments>http://blog.donews.com/caiyeah/archive/2005/12/09/652798.aspx#comments</comments>
		<pubDate>Fri, 09 Dec 2005 14:48:00 +0000</pubDate>
		<dc:creator>caiyeahku</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.donews.com/caiyeah/archive/2005/12/09/652798.aspx</guid>
		<description><![CDATA[http://www.php-editors.com/review/]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.php-editors.com/review/">http://www.php-editors.com/review/</a></p>
<p>免费的最好的应该是 <a href="http://www.mpsoftware.dk/phpdesigner.php">PHP Designer 2005</a>&nbsp;。投票人数明显比其它编辑器多几倍。5星级呢。</p>
<p>
<table cellspacing="0" cellpadding="6" width="100%" align="center" border="0">
<tbody>
<tr class="row1" height="20">
<td class="row1" valign="top" align="left"><a href="http://www.php-editors.com/review/?editor=98">PHP Designer 2005</a> </td>
<td class="row1" valign="top" align="center">3.0.6 </td>
<td class="row1" valign="top">Freeware<br/></td>
<td class="row1" valign="top">Windows<br/></td>
<td class="row1" valign="top" align="center">5/5 </td>
<td class="row1" valign="top" align="center"><b>4.74</b><br/>(1918 votes)</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://blog.donews.com/caiyeah/archive/2005/12/09/652798.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>如何删除MySQL的一个table？[Drop or delete a table in MySQL]</title>
		<link>http://blog.donews.com/caiyeah/archive/2005/11/28/641320.aspx</link>
		<comments>http://blog.donews.com/caiyeah/archive/2005/11/28/641320.aspx#comments</comments>
		<pubDate>Mon, 28 Nov 2005 12:47:00 +0000</pubDate>
		<dc:creator>caiyeahku</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://blog.donews.com/caiyeah/archive/2005/11/28/641320.aspx</guid>
		<description><![CDATA[<p>从MYSQL数据库中删除一个table，并且删除所有数据，可以使用下面的命令</p><pre style="BORDER-RIGHT: #ddd 2px solid; PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; PADDING-TOP: 10px; BORDER-BOTTOM: #ddd 2px solid; BACKGROUND-COLOR: #ffffcc">drop table if exists 数据表格名称;</pre>]]></description>
			<content:encoded><![CDATA[<p>从MYSQL数据库中删除一个table，并且删除所有数据，可以使用下面的命令</p>
<pre style="BORDER-RIGHT: #ddd 2px solid; PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; PADDING-TOP: 10px; BORDER-BOTTOM: #ddd 2px solid; BACKGROUND-COLOR: #ffffcc">drop table if exists 数据表格名称;</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.donews.com/caiyeah/archive/2005/11/28/641320.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fatal error: Only variables can be passed by reference in gettext.php on line 66 的解决办法</title>
		<link>http://blog.donews.com/caiyeah/archive/2005/11/28/641272.aspx</link>
		<comments>http://blog.donews.com/caiyeah/archive/2005/11/28/641272.aspx#comments</comments>
		<pubDate>Mon, 28 Nov 2005 12:23:00 +0000</pubDate>
		<dc:creator>caiyeahku</dc:creator>
				<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.donews.com/caiyeah/archive/2005/11/28/641272.aspx</guid>
		<description><![CDATA[如果你碰到下面这个问题Fatal error: Only variables can be passed by reference in   C:\web\wordpress\wp-includes\gettext.php on line 66说明你的PHP版本跟我一样^_^是5.0.5]]></description>
			<content:encoded><![CDATA[<p>如果你碰到下面这个问题</p>
<pre style="BORDER-RIGHT: #ddd 2px solid; PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; PADDING-TOP: 10px; BORDER-BOTTOM: #ddd 2px solid; BACKGROUND-COLOR: #ffffcc"><strong>Fatal error</strong>: Only variables can be passed by reference in   <strong>C:\web\wordpress\wp-includes\gettext.php</strong> on line <strong>66</strong></pre>
<p>说明你的PHP版本跟我一样^_^是<font color="#ff0000">5.0.5</font></p>
<p>怎么修正呢？台湾的<a href="http://www.joehorn.idv.tw/archives/2005/09/11/195/">blogger</a>找出解决方法</p>
<p>使用ultraedit代开gettext.php，找到第66行，代码如下</p>
<pre style="BORDER-RIGHT: #ddd 2px solid; PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; PADDING-TOP: 10px; BORDER-BOTTOM: #ddd 2px solid; BACKGROUND-COLOR: #ffffcc">return array_shift(unpack('V', $this-&gt;STREAM-&gt;read(4)));</pre>
<p>将其修改为</p>
<pre style="BORDER-RIGHT: #ddd 2px solid; PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; PADDING-TOP: 10px; BORDER-BOTTOM: #ddd 2px solid; BACKGROUND-COLOR: #ffffcc">$read_int_tmp = unpack('V', $this-&gt;STREAM-&gt;read(4));
return array_shift($read_int_tmp);</pre>
<p>保存后，再重新安装通过。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.donews.com/caiyeah/archive/2005/11/28/641272.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>几款 PHP IDE(集成开发坏境) 的介绍</title>
		<link>http://blog.donews.com/caiyeah/archive/2005/11/26/640574.aspx</link>
		<comments>http://blog.donews.com/caiyeah/archive/2005/11/26/640574.aspx#comments</comments>
		<pubDate>Sat, 26 Nov 2005 09:33:00 +0000</pubDate>
		<dc:creator>caiyeahku</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.donews.com/caiyeah/archive/2005/11/26/640574.aspx</guid>
		<description><![CDATA[作者：老鬼

我这里整理的都是专门为PHP设计的IDE，editplus,Ultra Edit等常用文本工具我就不介绍了！其中一些介绍是从那些下载站里复制过来的！
]]></description>
			<content:encoded><![CDATA[<div class="entry single" id="entry753">
<h1>PHP IDE</h1>
<p>作者：老鬼</p>
<p>我这里整理的都是专门为PHP设计的IDE，editplus,Ultra Edit等常用文本工具我就不介绍了！其中一些介绍是从那些下载站里复制过来的！<br/></p>
<div id="a000016more">
<div id="more">
<p><font color="#ff0000">Zend Studio</font><br/>开发商:<a href="http://www.zend.com/store/products/zend-studio.php" target="_blank">http://www.zend.com/store/products/zend-studio.php</a> <br/>目前公认的最强大的PHP开发工具，这种集成软件包包括了用于编辑，调试，配置PHP程序所需要的客户及服务器组件，软件包具有工业标准的PHP开发环境，代码完成引擎，功能齐全的调试器等 </p>
<p><font color="#ff0000">NuSphere PHPEd</font><br/><a href="http://www.nusphere.com/" target="_blank">http://www.nusphere.com/</a><br/>PhpED 通过无与伦比的PHP调试和压缩能力，以及一个新的NuSOAP web服务向导成为了PHP领域的领军产品。更加强大的Project Manager使得发布站点和应用程序比以前更加容易。现在可以在线程级别对正在运行或者开发中的程序进行测试和调校。支持 CVS 版本控制，而且，对PostgreSQL和MySQL数据库的本地支持为PHP使用开源数据库提供了一个广泛的环境。但对中文支持不太好，汉字都当作单字节处理了。PHPED还有Linux版本。</p>
<p><font color="#ff0000">PHP Coder</font><br/><a href="http://www.phpide.de/" target="_blank">http://www.phpide.de/</a><br/>PHPCoder用于快速开发和调试PHP应用程序,它很容易扩展和定制,完全能够符合开发者的个性要求.1:结合了PHP编译器和参考文档,可以对编辑中的PHP脚本进行即时预览2:支持高亮显示HTML和PHP代码;3:自动完成功能,可以自动完成用户自定义代码片断;4:标准函数提示;5:有专门的工程项目管理器;6:对象浏览器搜寻编辑中文件的包含信息,自定义函数,并以树形显示.7:支持查找对称的语句标记符;8:支持高级搜索和替换;9:自带FTP功能;10:支持运行和断点调试11:&#8230;&#8230;总之,PHPCoder是一个非常实用的,功能强大的编程环境,而且它是免费的！</p>
<p><font color="#ff0000">Ankord PHP Expert Editor</font><br/><a href="http://www.ankord.com/phpxedit.html" target="_blank">http://www.ankord.com/phpxedit.html</a><br/>PHP Expert Editor是一个容易使用的 PHP 开发工具，它的功能照顾到初级者及专业开发人员。 PHP Expert Editor 内建 http server 用作测试及除错(你也可以使用其他 http server), PHP 语法检查, FTP 功能, 程式码样板等功能。 </p>
<p><font color="#ff0000">DzSoft PHP Editor</font><br/><a href="http://www.dzsoft.com/dzphp.htm" target="_blank">http://www.dzsoft.com/dzphp.htm</a><br/>专为 PHP 所设计的网页程序编辑软件 &#8211; DzSoft PHP Editor，具有 PHP 编辑、侦错、浏览、原始码检视、档案浏览、可自订的原始码样本..等功能，无须架设网站主机就可以测试 PHP 指令码，是一套功能强大的 PHP 编程软件。 <br/>DzSoft PHP Editor和Ankord PHP Expert Editor非常相识，几乎找不到他们的主要区别，关于这两个软件之间的具体内幕我也不太清楚！</p>
<p><font color="#ff0000">Dev-PHP IDE</font><br/>非常好用的php编辑器，支持php-gtk，內建許多快速html表单，非常的好用，本身含繁体语言包，另附暗地论坛的中文语言包<br/><a href="http://devphp.sourceforge.net/" target="_blank">http://devphp.sourceforge.net/</a></p>
<p><font color="#ff0000">Master PHP</font><br/><a href="http://www.gsoftwares.com/" target="_blank">http://www.gsoftwares.com/</a><br/>一款支持PHP, PHP3, PHTML, CSS, JS, HTML, HTM and SQL的编辑器，它允许用户编辑多种一次编辑多种文件，允许插入，运行和最优化程序的脚本，用户可以通过工具栏定制按钮和窗体，可以导出html和rtf格式，支持18种语言</p>
<p><font color="#ff0000">Komodo</font><br/><a href="http://www.activestate.com/Products/Komodo/" target="_blank">http://www.activestate.com/Products/Komodo/</a><br/>Komodo支持在Windows与Linux上，Perl、Python及JavaScript等的程序语言开发，以及多种程序语言语法不同颜色标注。这款功能强大的IDE竟然不支持中文，连中文文件名的文件都打不开！</p>
<p><font color="#ff0000">Maguma Studio</font><br/><a href="http://www.maguma.com/" target="_blank">http://www.maguma.com/</a><br/>Maguma Studio包含了编辑和调试 PHP 程序所有必须的工具。无论您是经验丰富的开发者、或是初学者它都适合您。带有十分完整的断点、分步等调试功能。支持以树形方式显示文件中的函数和类成员。</p>
<p><font color="#ff0000">PhpLens</font><br/><a href="http://phplens.com/" target="_blank">http://phplens.com</a><br/>PhpLens是一款专为PHP开发人员准备的快速数据库开发程序。通过使用PhpLens，可以快速的设计、发布和维护数据库驱动的网络产品。它允许你以HTML表格的形式对数据库进行浏览、编辑、创建、删除和查找。不用写任何代码，它就允许你完成上述操作。</p>
<p>先介绍到这里，以后再慢慢整理，虽然上面的软件都很强大，但我最习惯用的还是editplus。一则我水平不够，这些软件的很多功能用不上，二则英文太差，想用他们还需要熟悉一段时间，更多的PHP IDE可以参考这篇文章 <a href="http://www.linuxdocs.org/HOWTOs/PHP-HOWTO-9.html" target="_blank">http://www.linuxdocs.org/HOWTOs/PHP-HOWTO-9.html</a></p>
</div>
</div>
<p class="posted">Posted by laogui at July 6, 2004 09:04 PM</p>
<p class="posted">来源：<a href="http://www.laogui.com/archives/2004/07/php_ide.html">http://www.laogui.com/archives/2004/07/php_ide.html</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.donews.com/caiyeah/archive/2005/11/26/640574.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

