<?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>Azone&#039;s Blog &#187; PHP编程</title>
	<atom:link href="http://www.firestudio.cn/category/php%e7%bc%96%e7%a8%8b/feed" rel="self" type="application/rss+xml" />
	<link>http://www.firestudio.cn</link>
	<description>用到一点记录一点。</description>
	<lastBuildDate>Thu, 01 Dec 2011 03:20:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>「转」在nginx中开启PHP的404等error错误转向</title>
		<link>http://www.firestudio.cn/2010/12/21/237.html</link>
		<comments>http://www.firestudio.cn/2010/12/21/237.html#comments</comments>
		<pubDate>Tue, 21 Dec 2010 10:20:46 +0000</pubDate>
		<dc:creator>Yozone Wong</dc:creator>
				<category><![CDATA[Linux相关]]></category>
		<category><![CDATA[PHP编程]]></category>
		<category><![CDATA[应用技巧]]></category>

		<guid isPermaLink="false">http://www.firestudio.cn/?p=237</guid>
		<description><![CDATA[公司统一使用了404 50x等比较直观的页面，在使用的时候忽然发现使用fastcgi的php当访问一个不存在的.php页面，居然不生效,不会转向,当时查了很多资料没有找到相关说明，今天逛nignx wiki的时候忽然发现有个设置 location ~ ^.+\.php { include conf/fastcgi_params.conf; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /data/wwwroot/haha.91.com/webroot$fastcgi_script_name; fastcgi_intercept_errors on; } 即加入了这一行 fastcgi_intercept_errors on; 这样就能正常做error的错误转向了 紧接着问题又来了，怎么实现全局都实现这个功能呢,这样一个个的加可不是办法啊! 冥想中…… 原文：http://www.91linux.cn/?p=216]]></description>
		<wfw:commentRss>http://www.firestudio.cn/2010/12/21/237.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>通过数组方式访问PHP对象属性</title>
		<link>http://www.firestudio.cn/2010/05/21/162.html</link>
		<comments>http://www.firestudio.cn/2010/05/21/162.html#comments</comments>
		<pubDate>Fri, 21 May 2010 03:59:49 +0000</pubDate>
		<dc:creator>Yozone Wong</dc:creator>
				<category><![CDATA[PHP编程]]></category>
		<category><![CDATA[应用技巧]]></category>
		<category><![CDATA[ArrayAcces]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[php数组访问对象]]></category>

		<guid isPermaLink="false">http://www.firestudio.cn/?p=162</guid>
		<description><![CDATA[以前看到过新版本的Symfony的Form文档，在类中可以通过$this['key']的方法来访问当前对象中的widgets，我一直很诧异，为什么可以这样用呢？我试验过很多方法都没成功，今天终于找到答案了。 方法其实很简单，需要在类中继承PHP预定义接口ArrayAccess，并且包含offsetGet, offsetSet, offsetExists和offsetUnset四个方法就可以实现上述功能了。下面来举个例子： &#38;lt; ?php class test implements ArrayAccess &#123; private $_result = array&#40;'name' =&#38;gt; 'Yozone', 'age' =&#38;gt; '24'&#41;; public function offsetGet&#40;$key&#41; &#123; return $this-&#38;gt;_result&#91;$key&#93;; &#125; public function offsetExists&#40;$key&#41; &#123; return isset&#40;$this-&#38;gt;_result&#91;$key&#93;&#41;; &#125; public function offsetSet&#40;$key, $value&#41; &#123; $this-&#38;gt;_result&#91;$key&#93; = $value; &#125; public function offsetUnset&#40;$key&#41; &#123; unset&#40;$key&#41;; &#125; public function getName&#40;&#41; &#123; return $this&#91;'name'&#93;; [...]]]></description>
		<wfw:commentRss>http://www.firestudio.cn/2010/05/21/162.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>利用Nginx或者Apache和PHP配合将网页变成黑白版</title>
		<link>http://www.firestudio.cn/2010/04/21/151.html</link>
		<comments>http://www.firestudio.cn/2010/04/21/151.html#comments</comments>
		<pubDate>Wed, 21 Apr 2010 15:52:26 +0000</pubDate>
		<dc:creator>Yozone Wong</dc:creator>
				<category><![CDATA[PHP编程]]></category>
		<category><![CDATA[应用技巧]]></category>
		<category><![CDATA[网页相关]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[网页灰色]]></category>
		<category><![CDATA[黑白网页]]></category>

		<guid isPermaLink="false">http://www.firestudio.cn/?p=151</guid>
		<description><![CDATA[今天看到很多网站的网页都变成灰色了，很多是使用了IE的滤镜，但是在非IE下就失效了，有的用的是另做的一套黑白图片实现网页的黑白版，这样显得又太麻烦。 记得前一段时间看到老外的一篇利用Apache的mod_rewrite模块和php结合实现网站图片水印的文章，今天受到此文章的启发我就想能不能利用同样的原理来实现将网站的所有图片都变成黑白的呢？经过今天的实验，我成功了！证明我的想法是正确的！下面就介绍一下如何利用apache或者nginx与php的结合来实现黑白版的网页。 首先修改网站的apache配置文件（.htaccess也行）或者nginx的配置文件： Apache： RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f RewriteRule \.(gif&#124;jpeg&#124;jpg&#124;png)$ img_to_black_write.php [QSA,NC] Nginx（在server中加入）: if (!-f $request_filename) { rewrite ^(.*)\.(jpg&#124;png&#124;gif)$ /img_to_black_write.php; } 这里是img_to_black_write.php的代码 &#38;lt; ?php $file = $_SERVER&#91;'DOCUMENT_ROOT'&#93; . $_SERVER&#91;'REQUEST_URI'&#93;; $im = imagecreatefromstring&#40;file_get_contents&#40;$file&#41;&#41;; if &#40;imageistruecolor&#40;$im&#41;&#41; &#123; imagetruecolortopalette&#40;$im, true, 256&#41;; &#125; $total_colors = imagecolorstotal&#40;$im&#41;; &#160; for &#40;$i = 0; $i &#38;lt; $total_colors; $i++&#41;&#123; $rgb = imagecolorsforindex&#40;$im, [...]]]></description>
		<wfw:commentRss>http://www.firestudio.cn/2010/04/21/151.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>很简单、很快速的格式化文件大小</title>
		<link>http://www.firestudio.cn/2008/10/30/46.html</link>
		<comments>http://www.firestudio.cn/2008/10/30/46.html#comments</comments>
		<pubDate>Thu, 30 Oct 2008 09:36:46 +0000</pubDate>
		<dc:creator>Yozone Wong</dc:creator>
				<category><![CDATA[PHP编程]]></category>
		<category><![CDATA[应用技巧]]></category>
		<category><![CDATA[File size format]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.firestudio.cn/?p=46</guid>
		<description><![CDATA[今天在PHP官网（http://www.php.net）上面查询number_format函数的时候发现了一小段代码，虽然很短，但是我觉得很有用，最主要的是我受到了很多启发，下面把那段代码贴出来以便共享，:) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 &#60; ?php function format_filesize&#40;$number, $decimals = 3, $force_unit = false, $dec_char = ',', $thousands_char = ' '&#41; &#123; //string format_filesize(int(0,) $number, (bool(0), int(0,4)) $force_unit, int $decimals, char $dec_char, char $thousands_char) //format a filesize $number with unit (setted by $force_unit(see [...]]]></description>
		<wfw:commentRss>http://www.firestudio.cn/2008/10/30/46.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>刚刚给图片转换器加了改变大小的功能</title>
		<link>http://www.firestudio.cn/2008/06/04/38.html</link>
		<comments>http://www.firestudio.cn/2008/06/04/38.html#comments</comments>
		<pubDate>Wed, 04 Jun 2008 15:09:05 +0000</pubDate>
		<dc:creator>Yozone Wong</dc:creator>
				<category><![CDATA[PHP编程]]></category>
		<category><![CDATA[Image Converter]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.firestudio.cn/?p=38</guid>
		<description><![CDATA[刚刚完成了上次写的图片转换器的改变大小的功能，如果还有什么需要赶紧的希望大家指出来，以方便尽我的能力对其进行改进（这是我没事写着玩的，:)，纯属兴趣），网址：http://www.firestudio.cn/home/imageConverter.php]]></description>
		<wfw:commentRss>http://www.firestudio.cn/2008/06/04/38.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>图片转换器（我自己写的，大家赏个脸，给点意见~）</title>
		<link>http://www.firestudio.cn/2008/05/30/36.html</link>
		<comments>http://www.firestudio.cn/2008/05/30/36.html#comments</comments>
		<pubDate>Fri, 30 May 2008 03:44:39 +0000</pubDate>
		<dc:creator>Yozone Wong</dc:creator>
				<category><![CDATA[PHP编程]]></category>
		<category><![CDATA[Image Converter]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.firestudio.cn/?p=36</guid>
		<description><![CDATA[我昨天晚上写了一个图片转换的小程序（没有完成），刚刚把它搞定，很简单的一种，现丑了，呵呵~。其中包括从彩色到黑白的转换，图片质量的改变，是否交错 以及图片格式的转换（PNG, GIF和JPEG格式之间的转换）。下个星期我准备再对它进行完善一点，加点功能（比如调整大小）。有兴趣的朋友可以试一下给点意见。 图片转换器地址：http://www.firestudio.cn/home/imageConverter.php]]></description>
		<wfw:commentRss>http://www.firestudio.cn/2008/05/30/36.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>让你的jedit支持YAML文件</title>
		<link>http://www.firestudio.cn/2008/04/30/33.html</link>
		<comments>http://www.firestudio.cn/2008/04/30/33.html#comments</comments>
		<pubDate>Wed, 30 Apr 2008 03:17:53 +0000</pubDate>
		<dc:creator>Yozone Wong</dc:creator>
				<category><![CDATA[PHP编程]]></category>
		<category><![CDATA[应用技巧]]></category>

		<guid isPermaLink="false">http://www.firestudio.cn/?p=33</guid>
		<description><![CDATA[下载附件到你的jedit的modes目录下面，然后在你的modes目录下面的catalog中加入下面一句话： &#60;MODE NAME=”yaml” FILE=”yaml.xml” FILE_NAME_GLOB=”*.yml” /&#62; 下载]]></description>
		<wfw:commentRss>http://www.firestudio.cn/2008/04/30/33.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>生成随机密码</title>
		<link>http://www.firestudio.cn/2008/02/14/26.html</link>
		<comments>http://www.firestudio.cn/2008/02/14/26.html#comments</comments>
		<pubDate>Thu, 14 Feb 2008 13:38:31 +0000</pubDate>
		<dc:creator>Yozone Wong</dc:creator>
				<category><![CDATA[PHP编程]]></category>

		<guid isPermaLink="false">http://www.firestudio.cn/2008/02/14/%e7%94%9f%e6%88%90%e9%9a%8f%e6%9c%ba%e5%af%86%e7%a0%81.html</guid>
		<description><![CDATA[一个自动生成密码的密码生成器页面终于完工了，以后你就不必为注册时使用什么密码而发愁了，有兴趣者可以到http://www.firestudio.cn/randPass.php上面去测试和使用！]]></description>
		<wfw:commentRss>http://www.firestudio.cn/2008/02/14/26.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jEdit快捷键</title>
		<link>http://www.firestudio.cn/2007/12/14/23.html</link>
		<comments>http://www.firestudio.cn/2007/12/14/23.html#comments</comments>
		<pubDate>Fri, 14 Dec 2007 02:16:02 +0000</pubDate>
		<dc:creator>Yozone Wong</dc:creator>
				<category><![CDATA[PHP编程]]></category>

		<guid isPermaLink="false">http://www.firestudio.cn/?p=23</guid>
		<description><![CDATA[昨天搞了一天终于把我一直想整理和翻译的jEdit帮助手册里的jEdit快捷键部分给搞定了，希望能给用jEdit的用户一些帮助。单击这里Keyboard-Shortcuts(PDF)下载]]></description>
		<wfw:commentRss>http://www.firestudio.cn/2007/12/14/23.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>About sfSimpleCMSPlugin</title>
		<link>http://www.firestudio.cn/2007/09/21/13.html</link>
		<comments>http://www.firestudio.cn/2007/09/21/13.html#comments</comments>
		<pubDate>Fri, 21 Sep 2007 06:35:18 +0000</pubDate>
		<dc:creator>Yozone Wong</dc:creator>
				<category><![CDATA[PHP编程]]></category>

		<guid isPermaLink="false">http://www.firestudio.cn/?p=13</guid>
		<description><![CDATA[昨天我安装了Symfony的一个插件并且试着使用了一番，发现sfSimpleCMSPlugin是一个很不错的内用管理系统，最起码管理起来很方便，很简洁，很使用。 sfSimpleCMSPlugin，说是Simple其实并不Simple， 只是使用起来相当的Simple。安装起来也比较Simple，和别的Sy mfony的安装方法差不多。只是在安装sfSimpleCMS之前必须安装sfPropelActAsNestedSetBehaviorPlugin。具体安装方法就要看sfSimpleCMSPlugin(http://trac.symfony-project.com/trac/wiki/sfSimpleCMSPlugin)和sfPropelActAsNestedSetBehaviorPlugin(http://trac.symfony-project.com/trac/wiki/sfPropelActAsNestedSetBeHaviorPlgin)的ReadMe了，在这里我就不多说了。 下面我们先来看一下它的界面： 这和普通的界面相比没什么两样。关键是后台管理就与别的大不相同咯~~，下面再看几张图： 再来两张编辑模式下的： 虽然功能很强大，挺NB的，不过有一点用着非常不爽。那就是在五种文本模式切换的时候一定要先update一下才能切换过去，这一点令我很郁闷。希望有关开发人员尽快解决这个问题，开发出一个更NB，更Simple的sfSimpleCMSPlugin出来！]]></description>
		<wfw:commentRss>http://www.firestudio.cn/2007/09/21/13.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

