<?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>赵明亮::地下CBD人生后花园 &#187; PHP笔记</title>
	<atom:link href="http://www.zhaomingliang.com/tag/php/feed" rel="self" type="application/rss+xml" />
	<link>https://www.zhaomingliang.com</link>
	<description>代办公墓</description>
	<lastBuildDate>Tue, 22 May 2012 00:09:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>PHP-APC引起Fatal error: Cannot redeclare class</title>
		<link>https://www.zhaomingliang.com/2011/10/fatal-error-cannot-redeclare-class-php-apc.html</link>
		<comments>https://www.zhaomingliang.com/2011/10/fatal-error-cannot-redeclare-class-php-apc.html#comments</comments>
		<pubDate>Thu, 13 Oct 2011 23:52:17 +0000</pubDate>
		<dc:creator>赵明亮</dc:creator>
				<category><![CDATA[PHP笔记]]></category>
		<category><![CDATA[apc]]></category>

		<guid isPermaLink="false">http://www.zhaomingliang.com/?p=2496</guid>
		<description><![CDATA[之前启动了memcached之后,服务器没任何问题,昨晚装了PHP-APC之后早上一看所有php执行都有问题,类似: Fatal error: Cannot redeclare class PMA_List in /data/www/pma/libraries/List.class.php on line 16 都是无法重声明程序的内部标准类.重启php之后可正常,再刷新就不行. 一搜,不少这样的问题,但都不明就里. 因为怀疑apc的问题,删除apc.ini重启,无效. 然后在php.ini里apc.enabled=0,重启,正常. 目前还没确定到底是什么原因引起的,apc的版本是3.1.9 求原因.]]></description>
		<wfw:commentRss>https://www.zhaomingliang.com/2011/10/fatal-error-cannot-redeclare-class-php-apc.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS 5.5用yum无法升级到php5.2.x的问题</title>
		<link>https://www.zhaomingliang.com/2010/10/centos-yum-update-php-5-2-x.html</link>
		<comments>https://www.zhaomingliang.com/2010/10/centos-yum-update-php-5-2-x.html#comments</comments>
		<pubDate>Wed, 20 Oct 2010 03:46:25 +0000</pubDate>
		<dc:creator>赵明亮</dc:creator>
				<category><![CDATA[PHP笔记]]></category>
		<category><![CDATA[多读点书]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[升级]]></category>

		<guid isPermaLink="false">http://www.zhaomingliang.com/?p=2364</guid>
		<description><![CDATA[有一个破服务器装了64位的Cent OS 5.5,用yum安装php,版本是5.1.6的. 现在程序大多需要5.2.x,用常规的yum update php根本不能更新,5.1.6是centos官方的最新版了似乎(擦,为啥不更新新点的啊) 在网上找了两个方法都无法正确升级.最后Google到一个能升级到5.2的办法,不过是半官方的- CentOS-Testing. 方法: 1.编辑/etc/yum.repos.d/CentOS-Base.repo,再最后加入下列内容在保存 [c5-testing] name=CentOS-5 Testing baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/ enabled=0 gpgcheck=1 gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing 2.然后其他源停用,就用CentOS-Testing来搜索php的更新. yum --disablerepo=* --enablerepo=c5-testing check-update php* 3.接着就展示出一堆稀里哗啦的更细,泪奔.注意看,是不是都是php-xxx 5.2.x c5-testing这样东西. 4.如果没有问题,那么just do it&#8230; yum --disablerepo=* --enablerepo=c5-testing update php* 装完后php -v看一样版本是不是5.2.x了?嗯,到时候跑的时候记得重启apache.]]></description>
		<wfw:commentRss>https://www.zhaomingliang.com/2010/10/centos-yum-update-php-5-2-x.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IIS下PHP实现的404页301跳转</title>
		<link>https://www.zhaomingliang.com/2010/01/php-for-301-moved-permanently-to-404-error.html</link>
		<comments>https://www.zhaomingliang.com/2010/01/php-for-301-moved-permanently-to-404-error.html#comments</comments>
		<pubDate>Mon, 04 Jan 2010 23:24:29 +0000</pubDate>
		<dc:creator>赵明亮</dc:creator>
				<category><![CDATA[PHP笔记]]></category>
		<category><![CDATA[301]]></category>
		<category><![CDATA[404]]></category>
		<category><![CDATA[iis]]></category>

		<guid isPermaLink="false">http://www.zhaomingliang.com/?p=1969</guid>
		<description><![CDATA[是不是看不懂了? 那么这样说吧.比如1ting.com是个IIS下的独立站点,和www.1ting.com是不同的.而且1ting.com没有rewrite之类的,只能运行php.那么怎么实现访问1ting.com/xxx.html时候直接跳转到www.1ting.com/xxx.html.光总想了一个办法:自定义404页面,然后用404页面来301转向. 先指定一个404页面 404页面的代码: &#60;?php $request_uri = isset($_SERVER["REQUEST_URI"]) ? $_SERVER["REQUEST_URI"] : ''; $redirect_uri = sprintf('http://www.1ting.com%s',$request_uri); header( "HTTP/1.1 301 Moved Permanently" ); header( "content-type: text/html;charset=UTF-8" ); header('Status: 301 Moved Permanently'); header(sprintf('Location: %s',$redirect_uri) ); echo ('&#60;a href="' .$redirect_uri . '"&#62;The page you are looking for has moved to ' .$redirect_uri . '&#60;/a&#62;'); ?&#62; 用这段代码就能实现了.当然还可以重定向到别的上去.但是返回的状态码是404先. 还有,别他妈跟我讲SEO了,这个是给人看的.]]></description>
		<wfw:commentRss>https://www.zhaomingliang.com/2010/01/php-for-301-moved-permanently-to-404-error.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>一起挖土豆</title>
		<link>https://www.zhaomingliang.com/2007/06/tudou_flv.html</link>
		<comments>https://www.zhaomingliang.com/2007/06/tudou_flv.html#comments</comments>
		<pubDate>Wed, 27 Jun 2007 07:07:31 +0000</pubDate>
		<dc:creator>赵明亮</dc:creator>
				<category><![CDATA[PHP笔记]]></category>
		<category><![CDATA[flv]]></category>
		<category><![CDATA[土豆]]></category>

		<guid isPermaLink="false">http://www.zhaomingliang.com/2007/06/823/tudou_flv/</guid>
		<description><![CDATA[土豆的视频速度很快啊,把他的flv挖出来,放自己那里看多好啊.大家一起挖土豆啊! [php] < ? /* @Name:Dig Tudou */ ?> 土豆播放页地址:]]></description>
		<wfw:commentRss>https://www.zhaomingliang.com/2007/06/tudou_flv.html/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>利用curl来下载</title>
		<link>https://www.zhaomingliang.com/2007/06/curl-download.html</link>
		<comments>https://www.zhaomingliang.com/2007/06/curl-download.html#comments</comments>
		<pubDate>Sun, 10 Jun 2007 03:32:53 +0000</pubDate>
		<dc:creator>赵明亮</dc:creator>
				<category><![CDATA[PHP笔记]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[下载]]></category>

		<guid isPermaLink="false">http://www.zhaomingliang.com/2007/06/794/test/</guid>
		<description><![CDATA[据说利用curl下载效率高.当然使用前提是在php,ini中打开curl这个拓展. function curl_download($remote, $local) { $cp = curl_init($remote); $fp = fopen($local, "w"); curl_setopt($cp, CURLOPT_FILE, $fp); curl_setopt($cp, CURLOPT_HEADER, 0); curl_exec($cp); curl_close($cp); fclose($fp); } /*-----------USEAGE---------------- curl_download("https://www.zhaomingliang.com/wp-content/uploads/2007/05/girl1.jpg","Girl.jpg"); -----------USEAGE----------------*/]]></description>
		<wfw:commentRss>https://www.zhaomingliang.com/2007/06/curl-download.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>某公司的技术人员</title>
		<link>https://www.zhaomingliang.com/2006/10/virtual_host.html</link>
		<comments>https://www.zhaomingliang.com/2006/10/virtual_host.html#comments</comments>
		<pubDate>Tue, 31 Oct 2006 12:05:20 +0000</pubDate>
		<dc:creator>赵明亮</dc:creator>
				<category><![CDATA[PHP笔记]]></category>
		<category><![CDATA[民工日记]]></category>
		<category><![CDATA[虚拟主机]]></category>

		<guid isPermaLink="false">http://www.zhaomingliang.com/2006/10/547/virtual_host/</guid>
		<description><![CDATA[我在某公司租了个空间,里面放了一个不到500IP的站. 今天我接到他们公司技术人员的电话,说我某个文件占用了很多系统资源,他们已经帮我拿掉. 部分对话如下: (略去调情部分,当时已经愤怒) 技:你的xx.php占用了很多资源,我已经帮你放到htdocs目录里了. 我:我违反规定了么?我没超流量吧? 技:没.但是日志里都是这个文件的记录. 我:既然你拿掉了,还打电话给我干吗呢? 技:这是你的东西,所以我通知你一下. 我:既然是我的东西,你为什么不先通知我再删呢? 技:&#8230;我确认是这个文件的问题了&#8230; 我:我都把文件注释掉了,占什么资源?(之前重复过几次) 技:你的占不适合放虚拟主机 啪&#8230;我挂了电话.虽然这样挂电话很没礼貌,但是我一直不是有修养的人. 具体是这样的. 因为我要测试一下某个功能,所以写了一个php文件,大致就是访问这个页面就打开某个特定的远程页面.然后把这个代码放到某个有几万PV的页面上刷.但是经过测试后发现失败,我就注释掉了.代码如下 如果是光一个echo都撑不了几万PV的话,只能说明服务器的配置有大大的问题.不在乎是不是可以继续放,居然在这个连我都知道的技术问题上争论不休,非常恼怒. 替某总悲哀一把.如果某总订阅了我的RSS,也想和我探讨一下,欢迎联系.]]></description>
		<wfw:commentRss>https://www.zhaomingliang.com/2006/10/virtual_host.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>从零开始学PHP第七天</title>
		<link>https://www.zhaomingliang.com/2006/04/php-6.html</link>
		<comments>https://www.zhaomingliang.com/2006/04/php-6.html#comments</comments>
		<pubDate>Sun, 16 Apr 2006 11:50:09 +0000</pubDate>
		<dc:creator>赵明亮</dc:creator>
				<category><![CDATA[杂七杂八]]></category>
		<category><![CDATA[for]]></category>
		<category><![CDATA[PHP笔记]]></category>
		<category><![CDATA[str_pad]]></category>

		<guid isPermaLink="false">http://www.zhaomingliang.com/2006/04/329/php-6/</guid>
		<description><![CDATA[嗯,一直知道用for可以来递增,但是具体怎么用就不清楚了,所以还是记一笔.]]></description>
		<wfw:commentRss>https://www.zhaomingliang.com/2006/04/php-6.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>从零开始学php 第六天</title>
		<link>https://www.zhaomingliang.com/2006/04/php-5.html</link>
		<comments>https://www.zhaomingliang.com/2006/04/php-5.html#comments</comments>
		<pubDate>Fri, 07 Apr 2006 01:37:45 +0000</pubDate>
		<dc:creator>赵明亮</dc:creator>
				<category><![CDATA[PHP笔记]]></category>
		<category><![CDATA[strlen]]></category>
		<category><![CDATA[str_replace]]></category>

		<guid isPermaLink="false">http://www.zhaomingliang.com/2006/04/322/php-5/</guid>
		<description><![CDATA[昨晚,Lee给俺布置了个简单的作业,是查询一个字符串在另一个字符串中出现的次数,提示用函数是str_replace和strlen. 昨晚睡着睡着突然想起了一个方法.]]></description>
		<wfw:commentRss>https://www.zhaomingliang.com/2006/04/php-5.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>从零开始学php 第五天</title>
		<link>https://www.zhaomingliang.com/2006/04/php-4.html</link>
		<comments>https://www.zhaomingliang.com/2006/04/php-4.html#comments</comments>
		<pubDate>Thu, 06 Apr 2006 01:32:04 +0000</pubDate>
		<dc:creator>赵明亮</dc:creator>
				<category><![CDATA[PHP笔记]]></category>
		<category><![CDATA[include]]></category>
		<category><![CDATA[require]]></category>

		<guid isPermaLink="false">http://www.zhaomingliang.com/2006/04/321/php-4/</guid>
		<description><![CDATA[昨晚快进着看了半个小时的视频教程,终于发现了一个对我来说有点价值的:就是require和include的区别. 以前没有查过手册,因为这两个太常用了,昨天才知道原来区别很大.require的那个文件如果不存在的话,程序就产生一个fatal error,程序不会继续执行下去,include的那个文件不存在的话,程序只产生一个warning,还是会执行下去的.比如说这样吧,比如x.txt都不存在.那么 这段代码就会出现错误提示(前提是木有关闭报错),而不会执行echo那句. 这段代码就会出现警告提示,echo这句继续执行,所以文件还是输出了haha,嗯,怕自己忘记.]]></description>
		<wfw:commentRss>https://www.zhaomingliang.com/2006/04/php-4.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>从零开始学PHP 第四天</title>
		<link>https://www.zhaomingliang.com/2006/04/file-get-contents.html</link>
		<comments>https://www.zhaomingliang.com/2006/04/file-get-contents.html#comments</comments>
		<pubDate>Mon, 03 Apr 2006 07:06:26 +0000</pubDate>
		<dc:creator>赵明亮</dc:creator>
				<category><![CDATA[PHP笔记]]></category>
		<category><![CDATA[小偷]]></category>

		<guid isPermaLink="false">http://www.zhaomingliang.com/2006/04/316/file-get-contents/</guid>
		<description><![CDATA[经常看小偷程序,老看到file()这个函数,今天特地看了一下手册.file是将把整个文件读入一个数组中.难怪小偷经常用.然后看到还有一个类似功能的函数:file_get_contents(),是将整个文件读入一个字符串,呵呵,难怪caoz老说用file_get_contents.然后用替换就偷出来东西了,哈哈. 不过有一点不明白,数组和字符串有啥区别呢?谁给俺一点解释?]]></description>
		<wfw:commentRss>https://www.zhaomingliang.com/2006/04/file-get-contents.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>从零开始学php 第三天</title>
		<link>https://www.zhaomingliang.com/2006/04/php-3.html</link>
		<comments>https://www.zhaomingliang.com/2006/04/php-3.html#comments</comments>
		<pubDate>Sun, 02 Apr 2006 11:54:03 +0000</pubDate>
		<dc:creator>赵明亮</dc:creator>
				<category><![CDATA[PHP笔记]]></category>
		<category><![CDATA[__FILE__]]></category>

		<guid isPermaLink="false">http://www.zhaomingliang.com/2006/04/315/php-3/</guid>
		<description><![CDATA[昨天晚上看到了一句dirname(__FILE__),有点不明白.dirname好理解,是返回路径中的目录部分,问题是__FILE__(菜了一点)不理解,后来翻了一些资料,大致认为是当前文件,问Lee确认是这样.PHP真是深不可测啊. 以下留案备查 假设__FILE__为 /home/web/config/config.php]]></description>
		<wfw:commentRss>https://www.zhaomingliang.com/2006/04/php-3.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>从零开始学php 第二天</title>
		<link>https://www.zhaomingliang.com/2006/04/php-2.html</link>
		<comments>https://www.zhaomingliang.com/2006/04/php-2.html#comments</comments>
		<pubDate>Sat, 01 Apr 2006 07:28:00 +0000</pubDate>
		<dc:creator>赵明亮</dc:creator>
				<category><![CDATA[PHP笔记]]></category>
		<category><![CDATA[str_ireplace]]></category>
		<category><![CDATA[str_replace]]></category>

		<guid isPermaLink="false">http://www.zhaomingliang.com/2006/04/312/php-2/</guid>
		<description><![CDATA[昨天我和Lee说到php的函数里我除了对str_replace最熟之外,其他的都是不认识的.然后Lee发给我一个str_ireplace的.我查了一下手册,是PHP5中新增的函数,主要是不分字母的大小写来替换.str_replace是严格按照字母的大小写来替换的.用str_ireplace来执行下面一段代码: 执行主来的效果应该是 赵明亮是猪 晚上继续看两行代码.]]></description>
		<wfw:commentRss>https://www.zhaomingliang.com/2006/04/php-2.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>从零开始学php 第一天</title>
		<link>https://www.zhaomingliang.com/2006/03/php.html</link>
		<comments>https://www.zhaomingliang.com/2006/03/php.html#comments</comments>
		<pubDate>Fri, 31 Mar 2006 13:28:43 +0000</pubDate>
		<dc:creator>赵明亮</dc:creator>
				<category><![CDATA[PHP笔记]]></category>
		<category><![CDATA[strtolower]]></category>

		<guid isPermaLink="false">http://www.zhaomingliang.com/2006/03/311/php/</guid>
		<description><![CDATA[在老板多学点东西的建议下,在Lee的煽动下,我开始从零学起PHP.你一定觉得很奇怪,赵明亮翻译了不少PHP程序了,难道他还不会?是的,我还真的不会.只能看到似懂非懂阶段.从今天开始,计划是每天看两行代码,记一个函数. 今天记的函数是strtolower,这个函数是把字符串里的字母都小写了,手册里的范例: < ?php $str = "Mary Had A Little Lamb and She LOVED It So"; $str = strtolower($str); echo $str; // Prints mary had a little lamb and she loved it so ?>]]></description>
		<wfw:commentRss>https://www.zhaomingliang.com/2006/03/php.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>终于升级到wordpress 2.0.2 RC1</title>
		<link>https://www.zhaomingliang.com/2006/03/wordpress-202-rc1.html</link>
		<comments>https://www.zhaomingliang.com/2006/03/wordpress-202-rc1.html#comments</comments>
		<pubDate>Tue, 07 Mar 2006 04:21:43 +0000</pubDate>
		<dc:creator>赵明亮</dc:creator>
				<category><![CDATA[PHP笔记]]></category>
		<category><![CDATA[Wordpress中文]]></category>

		<guid isPermaLink="false">http://www.zhaomingliang.com/2006/03/251/wordpress-202-rc1/</guid>
		<description><![CDATA[在wp的maillist里看了很多关于2.0.2的问题,今天Ryan Boren终于放出RC版了,估计解决得差不多了,咱就换上玩玩.可怜的是,我修改过的个别文件又要重新修改了(主要是忘记了哪些文件,主要是做中文化的).升级很简单,还是直接运行./wp-admin/upgrade.php就可以了. Bugfix:  &#8221;Add Category&#8221; on Write screen should not appear for users who do not have &#8220;manage_categories&#8221; cap    Next month in wp-calendar not i18n enabled   TinyMCE (rich text editor) Tooltips are wrong in Mac Browsers     DateTime display broken     faulty &#8220;referredby&#8221; in write post page     RTE assumes links are relative to [...]]]></description>
		<wfw:commentRss>https://www.zhaomingliang.com/2006/03/wordpress-202-rc1.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>GD 1和2 生成的图片质量问题</title>
		<link>https://www.zhaomingliang.com/2006/03/php-gd.html</link>
		<comments>https://www.zhaomingliang.com/2006/03/php-gd.html#comments</comments>
		<pubDate>Tue, 07 Mar 2006 02:17:49 +0000</pubDate>
		<dc:creator>赵明亮</dc:creator>
				<category><![CDATA[PHP笔记]]></category>
		<category><![CDATA[GD]]></category>

		<guid isPermaLink="false">http://www.zhaomingliang.com/2006/03/250/php-gd/</guid>
		<description><![CDATA[到现在还有人问:我生成的图片质量怎么这么差呀. 其实现在服务器上的GD Lib都是 2+的,在GD 2里,用imagecreate()函数创建的图像质量很差(在GD 1就不会).解决方法好简单的:imagecreatetruecolor()(当然,需要在php版本是4.0.6之上的,具体可以看手册)就可以创建真彩色的高质量图片.]]></description>
		<wfw:commentRss>https://www.zhaomingliang.com/2006/03/php-gd.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using apc
Database Caching using apc
Object Caching 629/767 objects using disk: basic

Served from: www.zhaomingliang.com @ 2012-05-25 13:43:55 -->
