<?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>没有比人更高的山 &#187; PHP</title>
	<atom:link href="http://www.zhlwish.com/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zhlwish.com</link>
	<description>Where there is a will there is a way.</description>
	<lastBuildDate>Fri, 13 Jan 2012 08:13:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>CakePHP在Windows+Apache上的配置</title>
		<link>http://www.zhlwish.com/2011/03/28/cakephp_win_apache/</link>
		<comments>http://www.zhlwish.com/2011/03/28/cakephp_win_apache/#comments</comments>
		<pubDate>Sun, 27 Mar 2011 16:30:00 +0000</pubDate>
		<dc:creator>周亮</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[mvc]]></category>

		<guid isPermaLink="false">http://www.zhlwish.com/?p=328</guid>
		<description><![CDATA[Windows上Apache+PHP+MySQL的安装配置就不多说了，这篇文章写得不错，全面实用PHP环境搭建:Windows 7下安装配置PHP+Apache+Mysql环境教程 不过我安装好PHP之后，发现Apache启动的时候总是无法加载extention，在log/error.log里面打印一句话： PHP Warning: PHP Startup: Unable to load dynamic library 后来把php的安装路径加入到系统环境变量PATH中就解决了这个问题，注意一定是系统环境变量，本人最初是傻不啦叽的加入到用户环境变量的PATH里面，结果不起作用。 经过测试PHP的环境搭建好之后，就可以开始配置CakePHP了，我下载的CakePHP解压后放在E:\Working\cakephp里面，下文多出要用到，特此声明。 首先启动Apache的mod_rewrite，在httpd.conf里面找到下面的语句，在118行左右，去掉最前的注释符号(#) #LoadModule rewrite_module modules/mod_rewrite.so 然后在httpd.conf的最后加入以下配置： Alias "/cake" "e:/Working/cakephp" &#60;Directory "e:/Working/cakephp"&#62; Options FollowSymLinks AllowOverride All Order allow,deny Allow from all &#60;/Directory&#62; 重启Apache后，访问http://localhost/cake出现”The requested URL /Working/cakephp/app/webroot/index.php was not &#8230; <a href="http://www.zhlwish.com/2011/03/28/cakephp_win_apache/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://www.zhlwish.com/2011/03/28/cakephp_win_apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP获取本周所有天的日期</title>
		<link>http://www.zhlwish.com/2010/12/28/php_days_in_current_week/</link>
		<comments>http://www.zhlwish.com/2010/12/28/php_days_in_current_week/#comments</comments>
		<pubDate>Mon, 27 Dec 2010 17:37:26 +0000</pubDate>
		<dc:creator>周亮</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[web后台]]></category>

		<guid isPermaLink="false">http://www.zhlwish.com/?p=277</guid>
		<description><![CDATA[晚上折腾了一个小时，找到了一种获取当前星期的所有的天的日期的办法，做个小笔记，下面这个例子显示了周日到周六以及当天的时间，最下面是一个界面截图，做了一个小工具记录项目组组员的出勤时间并统计。 $jdtoday = gregoriantojd&#40;date&#40;'n'&#41;, date&#40;'j'&#41;, date&#40;'y'&#41;&#41;; $offset = jddayofweek&#40;$jdtoday&#41;; for&#40;$i=0-$offset; $i&#38;lt;7-$offset; $i++&#41;&#123; $date = strtotime&#40;$i.' days'&#41;; echo&#40;'&#60;th&#62;'.date&#40;'D', $date&#41;.'/'.date&#40;'n-j', $date&#41;.'&#60;/th&#62;'&#41;; &#125; 解释： 1.首先把用gregoriantojd把公历日期转化为julian日期； 2.接着使用jddayofweek判断出当前天处于本周的第几天，此函数返回一个数字； 3.使用strtotime函数，将“-2 days”这种日期格式转化为标准的日期； 4.使用date函数格式化显示日期字符串。]]></description>
		<wfw:commentRss>http://www.zhlwish.com/2010/12/28/php_days_in_current_week/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在Windows上安装PHP模板引擎Smarty</title>
		<link>http://www.zhlwish.com/2010/08/24/win_php_smarty/</link>
		<comments>http://www.zhlwish.com/2010/08/24/win_php_smarty/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 09:46:06 +0000</pubDate>
		<dc:creator>周亮</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[smarty]]></category>

		<guid isPermaLink="false">http://www.zhlwish.com/?p=230</guid>
		<description><![CDATA[安装Smarty 下载页面：http://www.smarty.net/download.php，下载Latest Stable Release，我选择的版本是2.6.26 解压到D:\php\smarty\，这个是我的安装路径，可以根据自己的需要更改，但是注意以下有这个路径的都需要修改 配置Smarty 修改PHP安装目录下的php.ini，找到如下两行所在的位置： 1 2 ; Windows: &#34;\path1;\path2&#34; ;include_path = &#34;.;c:\php\includes&#34; 修改为： 1 2 ; Windows: &#34;\path1;\path2&#34; include_path = &#34;.;D:\php\smarty\libs&#34; 重启Apache或者IIS 在你的网站目录（我网站的路径为D:/php/workspace/happylink，你同样需要根据实际情况修改）下新建两个文件夹 D:/php/workspace/happylink/smarty/templates D:/php/workspace/happylink/smarty/configs 在smarty的安装目录（即d:/php/smarty）下新建两个文件夹： d:/php/smarty/templdates_c d:/php/smarty/cache 在网站目录（即D:/php/workspace/happylink）下创建index.php，代码如下： 1 2 3 4 5 6 7 8 &#8230; <a href="http://www.zhlwish.com/2010/08/24/win_php_smarty/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://www.zhlwish.com/2010/08/24/win_php_smarty/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>MySQL中drop user if exists功能的实现方法</title>
		<link>http://www.zhlwish.com/2010/07/30/mysql-drop-user-if-not/</link>
		<comments>http://www.zhlwish.com/2010/07/30/mysql-drop-user-if-not/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 11:48:32 +0000</pubDate>
		<dc:creator>周亮</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.zhlwish.com/?p=218</guid>
		<description><![CDATA[在编写可以重复执行的创建数据库的脚本时，我们知道下面语句可以测试数据库是否存在，如果存在的话就删除掉 1 DROP DATABASE IF EXISTS testdb; 但是我们没办法测试用户是否存在，MySQL是没有drop user if exist这样的功能的。详见：http://bugs.mysql.com/bug.php?id=19166 不过有另外一种变通的办法可以实现同样的功能，代码如下： 1 2 3 4 # a way TO implement the functionality OF 'drop user if exists' which mysql does # NOT support FOR now GRANT usage ON *.* &#8230; <a href="http://www.zhlwish.com/2010/07/30/mysql-drop-user-if-not/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://www.zhlwish.com/2010/07/30/mysql-drop-user-if-not/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP的特点与发展的草根性</title>
		<link>http://www.zhlwish.com/2009/11/15/php/</link>
		<comments>http://www.zhlwish.com/2009/11/15/php/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 01:30:21 +0000</pubDate>
		<dc:creator>周亮</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.zhlwish.com/?p=57</guid>
		<description><![CDATA[一直以来都有一个疑问，就是为什么PHP的需求这么多？会有这个疑问，是因为我发现有很多可以合作的机会都是基于PHP的，而我对于PHP技术跟本就不了解。最近有个朋友去了一家公司实习，也是做PHP——这个极大的刺激了我，于是我对比了一下我熟悉的各种Web开发框架（包括ASP,ASP.NET,JSP,Ruby on Rails, Django），发现PHP的发展充满了“草根”特性，以至于很多人都忽略了它。 首先，任何一门技术要使用都需要学习，从学习成本上讲，PHP无疑是最小的，我花了半个小时浏览了W3School的PHP教程的基础部分，花了十几分钟看了看PHP如何连接MySQL数据库，就写出了一个简单的有登录、退出功能的网站，当然在写的过程的不断的在查API。想想学习C#、ruby、python、java、vbscript都得花一个星期或者更长的时间的时候，不禁心里想要是一开始就用了PHP该有多好啊。这几个当中，我自己认为学习难度排序是:(括号中的算是一个数量级的，如果JSP再包括struts、hibernate、spring等这些的话，那么Java又比ASP.NET要高上一个数量级了)。(JSP&#62;ASP.NET)&#62;(Python&#62;ruby)&#62;(ASP&#62;PHP) 我们在比较多种技术的时候往往只是很简单的比较其开发难度，而忽视服务器维护难度和成本。试想，企业本身有一个JSF+Hibernate+Spring架构的OA系统，如果开发者或者维护者一旦离职，继任着得如何上得了手？但是如果是PHP就不一样了，看一看语法，马上就可以开始工作了，这也迎合了目前大部分公司的需要。 其次，市场需求直接决定了开发群体的大小，中国互联网最多的需求都是一些很朴实的需求——一个主页、一个简单的办公系统，中小型企业没有能力和意识去发展自身的信息化，往往只需要一个主页和一个简单办公系统而已，而且在非IT中小企业，互联网营销并没有得到管理者的重视，所以IT人员往往处于很低的地位，往往也只有几个人或者根本没有人。这样的需求PHP能很好的满足了，而且简单直接。 再次，运行成本低，自己架设服务器基本只需要电脑费用、电费、网费，托管服务器价格更便宜，一个月几十块钱就行了。而且容量大，普通PC就可以承受一定的并发需求，不需要配置专门的服务器。前面我提到的那个JSF的OA系统部署的时候就需要1G的内存，这个网站是几年前开发的，那时候内存最大还是512M，想想都有点后怕。 正因为上面几个原因，PHP的发展不是大公司的推动（像IBM推SOA），也不是像若干年前的Java（技术比较先进，相比同时期的ASP功能强大得多），它的发展有着很深厚的群众基础，预计未来的几年在中国Web市场上还将有大的需求。 不过，也因为技术的发展，很多很多额外的因素被添加到PHP中，像面向对象、各种各样的框架等，使PHP不可避免的走向复杂，如何保持其草根性、其简洁决定了PHP能走多远。]]></description>
		<wfw:commentRss>http://www.zhlwish.com/2009/11/15/php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

