<?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>Tommy Code</title>
	<atom:link href="http://www.tommycode.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tommycode.com</link>
	<description>专注于PHP的高级应用</description>
	<lastBuildDate>Sat, 31 Dec 2011 03:50:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>远程调用SHELL函数</title>
		<link>http://www.tommycode.com/2011/12/31/%e8%bf%9c%e7%a8%8b%e8%b0%83%e7%94%a8shell%e5%87%bd%e6%95%b0/</link>
		<comments>http://www.tommycode.com/2011/12/31/%e8%bf%9c%e7%a8%8b%e8%b0%83%e7%94%a8shell%e5%87%bd%e6%95%b0/#comments</comments>
		<pubDate>Sat, 31 Dec 2011 03:50:32 +0000</pubDate>
		<dc:creator>tommy</dc:creator>
				<category><![CDATA[学习笔记]]></category>

		<guid isPermaLink="false">http://www.tommycode.com/?p=61</guid>
		<description><![CDATA[function remoteRunShell($ip, $shell, $sysuser, $syspass) { $connection = ssh2_connect($ip, 22); if(!ssh2_auth_password($connection, $sysuser, $syspass)) { return false; } $stream = ssh2_exec($connection, $shell); stream_set_blocking($stream, true); $output = stream_get_contents($stream); fclose($stream); return $output; }]]></description>
		<wfw:commentRss>http://www.tommycode.com/2011/12/31/%e8%bf%9c%e7%a8%8b%e8%b0%83%e7%94%a8shell%e5%87%bd%e6%95%b0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP获取文件权限函数</title>
		<link>http://www.tommycode.com/2011/09/13/php%e8%8e%b7%e5%8f%96%e6%96%87%e4%bb%b6%e6%9d%83%e9%99%90%e5%87%bd%e6%95%b0/</link>
		<comments>http://www.tommycode.com/2011/09/13/php%e8%8e%b7%e5%8f%96%e6%96%87%e4%bb%b6%e6%9d%83%e9%99%90%e5%87%bd%e6%95%b0/#comments</comments>
		<pubDate>Tue, 13 Sep 2011 08:47:08 +0000</pubDate>
		<dc:creator>tommy</dc:creator>
				<category><![CDATA[学习笔记]]></category>

		<guid isPermaLink="false">http://www.tommycode.com/?p=58</guid>
		<description><![CDATA[// 获取权限 function getChmod($filepath){ return substr(base_convert(@fileperms($filepath),10,8),-4); }]]></description>
		<wfw:commentRss>http://www.tommycode.com/2011/09/13/php%e8%8e%b7%e5%8f%96%e6%96%87%e4%bb%b6%e6%9d%83%e9%99%90%e5%87%bd%e6%95%b0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP执行系统命令函数</title>
		<link>http://www.tommycode.com/2011/09/13/php%e6%89%a7%e8%a1%8c%e7%b3%bb%e7%bb%9f%e5%91%bd%e4%bb%a4%e5%87%bd%e6%95%b0/</link>
		<comments>http://www.tommycode.com/2011/09/13/php%e6%89%a7%e8%a1%8c%e7%b3%bb%e7%bb%9f%e5%91%bd%e4%bb%a4%e5%87%bd%e6%95%b0/#comments</comments>
		<pubDate>Tue, 13 Sep 2011 08:44:42 +0000</pubDate>
		<dc:creator>tommy</dc:creator>
				<category><![CDATA[学习笔记]]></category>

		<guid isPermaLink="false">http://www.tommycode.com/?p=56</guid>
		<description><![CDATA[function execute($cfe) { $res = &#8221;; if ($cfe) { if(function_exists(&#8216;system&#8217;)) { @ob_start(); @system($cfe); $res = @ob_get_contents(); @ob_end_clean(); } elseif(function_exists(&#8216;passthru&#8217;)) { @ob_start(); @passthru($cfe); $res = @ob_get_contents(); @ob_end_clean(); } elseif(function_exists(&#8216;shell_exec&#8217;)) { $res = @shell_exec($cfe); } elseif(function_exists(&#8216;exec&#8217;)) { @exec($cfe,$res); $res = join(&#8220;\n&#8221;,$res); } &#8230; <a href="http://www.tommycode.com/2011/09/13/php%e6%89%a7%e8%a1%8c%e7%b3%bb%e7%bb%9f%e5%91%bd%e4%bb%a4%e5%87%bd%e6%95%b0/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://www.tommycode.com/2011/09/13/php%e6%89%a7%e8%a1%8c%e7%b3%bb%e7%bb%9f%e5%91%bd%e4%bb%a4%e5%87%bd%e6%95%b0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DoitPHP新版本将不支持ActiveRecord</title>
		<link>http://www.tommycode.com/2011/09/05/doitphp%e4%b8%8d%e6%94%af%e6%8c%81activerecord/</link>
		<comments>http://www.tommycode.com/2011/09/05/doitphp%e4%b8%8d%e6%94%af%e6%8c%81activerecord/#comments</comments>
		<pubDate>Mon, 05 Sep 2011 10:17:06 +0000</pubDate>
		<dc:creator>tommy</dc:creator>
				<category><![CDATA[学习笔记]]></category>

		<guid isPermaLink="false">http://www.tommycode.com/?p=51</guid>
		<description><![CDATA[昨晚研究了一个晚上的ActiveRecord..，看了许多知名的框架..国外的居多。自己也写了好多ActiveRecord程序在doitphp中的应用..一进行效率测试就直接拿掉了。原想新的doitphp支持下ActiveRecord来着，一来显示doitphp的功能强大..二来免得有人说doitphp不支持ActiveRecord等。现在坚定了我的信念：doitphp下一个版本还是不支持ActiveRecord的。如果我们没有找到一个简单高效的方法来处理这块..doitphp就会永不会支持。 doitphp不支持ActiveRecord原因有三： 1、从PHP语言本身的性质而言，ActiveRecord纯是花拳秀腿..运行效率慢..非常不实用。 2、ActiveRecord进行数据操作非常不灵活。对于新手入门难度高。像那些运用ActiveRecord的框架在给出的demo上，都是理想化的数据操作..在项目开发中这种理想化的数据操作情况出现机率很小。如果进行复杂点的处理直接就悲剧了。入门难度高则会使新手直接不使用这功能..框架加了这个功能也等于白加。 3、doitphp在处理多数据表的关联操作时，有更好的解决办法..在model层自定义业务逻辑(当然其它框架也有这个功能)..一来灵活，二来操作简单，三来运行高效。有人说使用ActiveRecord可以快速的开发程序..这个不假，可是对于那些熟练使用的人来说..使用情况也很有局限性。用自定义业务逻辑无非就是在model层多写几行代码..开发效率也慢不了哪里..问题是这样做来的极为方便,再复杂的数据处理也完全可以满足需要。这正是doitphp对外宣称的：操作简单，运行高效。]]></description>
		<wfw:commentRss>http://www.tommycode.com/2011/09/05/doitphp%e4%b8%8d%e6%94%af%e6%8c%81activerecord/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>关于doitphp,thinkphp,yii,ci,doophp等框架的性能对比测试</title>
		<link>http://www.tommycode.com/2011/07/16/%e5%85%b3%e4%ba%8edoitphpthinkphpyiicidoophpqeephp%e7%ad%89%e6%a1%86%e6%9e%b6%e7%9a%84%e6%80%a7%e8%83%bd%e5%af%b9%e6%af%94%e6%b5%8b%e8%af%95/</link>
		<comments>http://www.tommycode.com/2011/07/16/%e5%85%b3%e4%ba%8edoitphpthinkphpyiicidoophpqeephp%e7%ad%89%e6%a1%86%e6%9e%b6%e7%9a%84%e6%80%a7%e8%83%bd%e5%af%b9%e6%af%94%e6%b5%8b%e8%af%95/#comments</comments>
		<pubDate>Sat, 16 Jul 2011 11:18:48 +0000</pubDate>
		<dc:creator>tommy</dc:creator>
				<category><![CDATA[学习笔记]]></category>
		<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[doitphp]]></category>
		<category><![CDATA[doophp]]></category>
		<category><![CDATA[thinkphp]]></category>
		<category><![CDATA[yii]]></category>

		<guid isPermaLink="false">http://www.tommycode.com/?p=45</guid>
		<description><![CDATA[“Never guess, Get data”翻译成中国话就是：“不要胡乱猜测，拿出数据来证明”。前几天对常用的PHP框架进行了对比测试。内容如下： 测试环境： 硬件环境： THINKPAD T61笔记本 CPU:INTEL CORE(TM2) DUO T770 内存:2G 硬盘：320G 7200 显卡：集成显卡 软件环境： 操作系统：win 2003 sp2 PHP环境：Apache/2.2.17 (Win32) PHP/5.3.6 数据库：mysql 5.5.10 测试工具：apache bench (即:ab) 测试内容：ab -c 10 -n 1000 测试网址 让这些框架从同一个数据库，同一个数据表读出1000条数据，并在视图中显示出来，且视图采用视图渲染(即:layout和widget应用)。保证最后输出页面内容相同(HTML完全一样)。 测试结果： 1、原生php: 注：上图测试数据是500次的测试数据，在测试1000时，由于系统报错，故测试了500次。 所用时间：2.032秒(1.016*2) 平均每秒请求次数：492.31次 &#8230; <a href="http://www.tommycode.com/2011/07/16/%e5%85%b3%e4%ba%8edoitphpthinkphpyiicidoophpqeephp%e7%ad%89%e6%a1%86%e6%9e%b6%e7%9a%84%e6%80%a7%e8%83%bd%e5%af%b9%e6%af%94%e6%b5%8b%e8%af%95/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://www.tommycode.com/2011/07/16/%e5%85%b3%e4%ba%8edoitphpthinkphpyiicidoophpqeephp%e7%ad%89%e6%a1%86%e6%9e%b6%e7%9a%84%e6%80%a7%e8%83%bd%e5%af%b9%e6%af%94%e6%b5%8b%e8%af%95/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>使用PHP下载文件</title>
		<link>http://www.tommycode.com/2011/07/15/%e4%bd%bf%e7%94%a8php%e4%b8%8b%e8%bd%bd%e6%96%87%e4%bb%b6/</link>
		<comments>http://www.tommycode.com/2011/07/15/%e4%bd%bf%e7%94%a8php%e4%b8%8b%e8%bd%bd%e6%96%87%e4%bb%b6/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 08:30:57 +0000</pubDate>
		<dc:creator>tommy</dc:creator>
				<category><![CDATA[我的代码]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.tommycode.com/?p=40</guid>
		<description><![CDATA[使用PHP下载文件方法很多，比较常用的就是使用函数:readfile。演示代码如下： 代码一： header(&#8216;Content-Description: File Transfer&#8217;); header(&#8216;Content-Type: application/octet-stream&#8217;); header(&#8216;Content-Disposition: attachment; filename=&#8217;.basename($file_path)); header(&#8216;Content-Transfer-Encoding: binary&#8217;); header(&#8216;Expires: 0&#8242;); header(&#8216;Cache-Control: must-revalidate, post-check=0, pre-check=0&#8242;); header(&#8216;Pragma: public&#8217;); header(&#8216;Content-Length: &#8216; . filesize($file_path)); readfile($file_path); 代码二： $fileinfo = pathinfo($thefile); header(&#8216;Content-type: application/x-&#8217;.$fileinfo['extension']); header(&#8216;Content-Disposition: attachment; filename=&#8217;.$fileinfo['basename']); header(&#8216;Content-Length: &#8216;.filesize($thefile)); readfile($thefile); exit;]]></description>
		<wfw:commentRss>http://www.tommycode.com/2011/07/15/%e4%bd%bf%e7%94%a8php%e4%b8%8b%e8%bd%bd%e6%96%87%e4%bb%b6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>centos上安装php运行环境(手记)</title>
		<link>http://www.tommycode.com/2011/07/15/centos%e4%b8%8a%e5%ae%89%e8%a3%85php%e8%bf%90%e8%a1%8c%e7%8e%af%e5%a2%83%e6%89%8b%e8%ae%b0/</link>
		<comments>http://www.tommycode.com/2011/07/15/centos%e4%b8%8a%e5%ae%89%e8%a3%85php%e8%bf%90%e8%a1%8c%e7%8e%af%e5%a2%83%e6%89%8b%e8%ae%b0/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 03:10:22 +0000</pubDate>
		<dc:creator>tommy</dc:creator>
				<category><![CDATA[学习笔记]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[MYSQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.tommycode.com/?p=37</guid>
		<description><![CDATA[-, 配置apache 1.关闭防火墙 service iptables stop chkconfig iptables off 2.开启apache service httpd status service httpd start 3.更改http.conf配置 ServerTokens OS  &#8211;&#62; ServerTokens Prod ServerSignature On &#8211;&#62; ServerSignature Off DirectoryIndex index.html index.html.var &#8211;&#62; DirectoryIndex index.html index.php 更改管理员邮箱 #ServerName new.host.name:80 &#8211;&#62; 根据需要自行修改 Options &#8230; <a href="http://www.tommycode.com/2011/07/15/centos%e4%b8%8a%e5%ae%89%e8%a3%85php%e8%bf%90%e8%a1%8c%e7%8e%af%e5%a2%83%e6%89%8b%e8%ae%b0/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://www.tommycode.com/2011/07/15/centos%e4%b8%8a%e5%ae%89%e8%a3%85php%e8%bf%90%e8%a1%8c%e7%8e%af%e5%a2%83%e6%89%8b%e8%ae%b0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>常用的HTTP 状态</title>
		<link>http://www.tommycode.com/2011/07/15/%e5%b8%b8%e7%94%a8%e7%9a%84http-%e7%8a%b6%e6%80%81/</link>
		<comments>http://www.tommycode.com/2011/07/15/%e5%b8%b8%e7%94%a8%e7%9a%84http-%e7%8a%b6%e6%80%81/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 01:54:31 +0000</pubDate>
		<dc:creator>tommy</dc:creator>
				<category><![CDATA[学习笔记]]></category>
		<category><![CDATA[header]]></category>
		<category><![CDATA[http]]></category>

		<guid isPermaLink="false">http://www.tommycode.com/?p=35</guid>
		<description><![CDATA[header('HTTP/1.1 404 Not Found'); header('HTTP/1.1 403 Access forbidden'); 常用的HTTP 状态列表： 100 : Continue, 101 : Switching Protocols, 102 : Processing, 200 : OK, 201 : Created, 202 : Accepted, 203 : Non-Authoritative Information, 204 : No Content, 205 : Reset &#8230; <a href="http://www.tommycode.com/2011/07/15/%e5%b8%b8%e7%94%a8%e7%9a%84http-%e7%8a%b6%e6%80%81/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://www.tommycode.com/2011/07/15/%e5%b8%b8%e7%94%a8%e7%9a%84http-%e7%8a%b6%e6%80%81/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>关于DoitPHP的性能测试</title>
		<link>http://www.tommycode.com/2011/07/13/%e5%85%b3%e4%ba%8edoitphp%e7%9a%84%e6%80%a7%e8%83%bd%e6%b5%8b%e8%af%95/</link>
		<comments>http://www.tommycode.com/2011/07/13/%e5%85%b3%e4%ba%8edoitphp%e7%9a%84%e6%80%a7%e8%83%bd%e6%b5%8b%e8%af%95/#comments</comments>
		<pubDate>Wed, 13 Jul 2011 10:46:50 +0000</pubDate>
		<dc:creator>tommy</dc:creator>
				<category><![CDATA[学习笔记]]></category>
		<category><![CDATA[doitphp]]></category>

		<guid isPermaLink="false">http://www.tommycode.com/?p=31</guid>
		<description><![CDATA[自DoitPHP对外发布以来，首次进行对DoitPHP与其它PHP框架进行性能对比测试 测试数据如下：http://bbs.doitphp.com/thread-6-1-1.html (注：文章中有截图，需注册才能看到)。 关于DoitPHP的命名。Doit = do + it, 来源于某公司的广告词：“JUST DO IT”。]]></description>
		<wfw:commentRss>http://www.tommycode.com/2011/07/13/%e5%85%b3%e4%ba%8edoitphp%e7%9a%84%e6%80%a7%e8%83%bd%e6%b5%8b%e8%af%95/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>mysql社区版服务器5.5.14发布</title>
		<link>http://www.tommycode.com/2011/07/06/mysql%e7%a4%be%e5%8c%ba%e7%89%88%e6%9c%8d%e5%8a%a1%e5%99%a85-5-14%e5%8f%91%e5%b8%83/</link>
		<comments>http://www.tommycode.com/2011/07/06/mysql%e7%a4%be%e5%8c%ba%e7%89%88%e6%9c%8d%e5%8a%a1%e5%99%a85-5-14%e5%8f%91%e5%b8%83/#comments</comments>
		<pubDate>Wed, 06 Jul 2011 07:57:10 +0000</pubDate>
		<dc:creator>tommy</dc:creator>
				<category><![CDATA[学习笔记]]></category>
		<category><![CDATA[MYSQL]]></category>

		<guid isPermaLink="false">http://www.tommycode.com/?p=29</guid>
		<description><![CDATA[mysql官方网站发布了mysql社区版服务器的最新版本，5.5.14 下载地址： http://www.mysql.com/downloads/mysql/]]></description>
		<wfw:commentRss>http://www.tommycode.com/2011/07/06/mysql%e7%a4%be%e5%8c%ba%e7%89%88%e6%9c%8d%e5%8a%a1%e5%99%a85-5-14%e5%8f%91%e5%b8%83/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

