<?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>CNlaoKe&#039;s Blog &#187; PHP</title>
	<atom:link href="http://blog.cnlaoKe.com/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.cnlaoKe.com</link>
	<description>Rome was not built in a day!</description>
	<lastBuildDate>Wed, 25 Aug 2010 09:45:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP获取时间</title>
		<link>http://blog.cnlaoKe.com/2010/02/21/299/</link>
		<comments>http://blog.cnlaoKe.com/2010/02/21/299/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 09:06:47 +0000</pubDate>
		<dc:creator>CNlaoKe</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.cnlaoKe.com/2010/02/21/299/</guid>
		<description><![CDATA[使用函式 date() 实现                                        

显示的格式: 年-月-日 小时:分钟:秒
相关时间参数:
a &#8211; &#8220;am&#8221; 或是 &#8220;pm&#8221;
A &#8211; &#8220;AM&#8221; 或是 &#8220;PM&#8221;
d &#8211; 几日，二位数字，若不足二位则前面补零; [...]]]></description>
		<wfw:commentRss>http://blog.cnlaoKe.com/2010/02/21/299/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>用geo查IP</title>
		<link>http://blog.cnlaoKe.com/2009/08/03/117/</link>
		<comments>http://blog.cnlaoKe.com/2009/08/03/117/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 10:40:25 +0000</pubDate>
		<dc:creator>CNlaoKe</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.cnlaoKe.com/2009/08/03/117/</guid>
		<description><![CDATA[inc文件在这里
http://geolite.maxmind.com/download/geoip/api/php/geoip.inc  应该留着这个能更新一下
更精确的在
http://geolite.maxmind.com/download/geoip/api/php/geoipcity.inc
数据文件在
http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
&#60;?php
include(&#8221;geoip.inc&#8221;);
$gi = geoip_open(&#8221;d:/Projects/geo/GeoIP.dat&#8221;,GEOIP_STANDARD);
echo geoip_country_code_by_addr($gi, &#8220;24.24.24.24&#8243;) . &#8220;\t&#8221; .
geoip_country_name_by_addr($gi, &#8220;24.24.24.24&#8243;) . &#8220;\n&#8221;.&#8217;&#60;br /&#62;&#8217;;
echo geoip_country_code_by_addr($gi, &#8220;80.24.24.24&#8243;) . &#8220;\t&#8221; .
geoip_country_name_by_addr($gi, &#8220;80.24.24.24&#8243;) . &#8220;\n&#8221;.&#8217;&#60;br /&#62;&#8217;;
echo geoip_country_code_by_addr($gi, &#8220;222.48.200.11&#8243;) . &#8220;\t&#8221; .
geoip_country_name_by_addr($gi, &#8220;222.48.200.11&#8243;) . &#8220;\n&#8221;;
geoip_close($gi);
?&#62;
]]></description>
		<wfw:commentRss>http://blog.cnlaoKe.com/2009/08/03/117/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>header(Location:)应该注意的几个问题</title>
		<link>http://blog.cnlaoKe.com/2009/08/03/51/</link>
		<comments>http://blog.cnlaoKe.com/2009/08/03/51/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 09:18:06 +0000</pubDate>
		<dc:creator>CNlaoKe</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.cnlaoKe.com/2009/08/03/51/</guid>
		<description><![CDATA[


header(&#8221;Location:&#8221;)作为php的转向语句。其实在使用中，他有几点需要注意的地方。
1、要求header前没有任何输出
但 是很多时候在header前我们已经输出了好多东西了，但是此时如果再次header的话，显然是出错的，在这里我们启用了一个ob的概念，这个东东的 意思是在服务器端先存储有关输出，等待适当的时机再输出，而不是像现在这样运行一句，输出一句,发现header语句就只能报错了。
具体的语句有： ob_start(); ob_end_clean();ob_flush();&#8230;&#8230;&#8230;
2、在header(&#8221;Location:&#8221;)后要及时exit
 否则他是会继续执行的，虽然在浏览器端你看不到相应的数据出现，但是如果你进行抓包分析的话，你就会看到下面的语句也是在执行的。而且被输送到了浏览器客户端，只不过是没有被浏览器执行为html而已（浏览器执行了header进行了转向操作）。
所以,标准的使用方法是：
ob_start();
&#8230;&#8230;..
if ( something ){
ob_end_clean();
header(&#8221;Location: yourlocation&#8221;)；
exit;
else{
&#8230;&#8230;&#8230;.
ob_flush();  //可省略



]]></description>
		<wfw:commentRss>http://blog.cnlaoKe.com/2009/08/03/51/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Warning: Cannot modify header information &#8211; header</title>
		<link>http://blog.cnlaoKe.com/2009/08/03/50/</link>
		<comments>http://blog.cnlaoKe.com/2009/08/03/50/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 09:17:45 +0000</pubDate>
		<dc:creator>CNlaoKe</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.cnlaoKe.com/2009/08/03/50/</guid>
		<description><![CDATA[本文讨论的是如何彻底杜绝warning: Cannot add header information &#8211; headers already sent in……  这种令人莫明其妙的的错误。只要你写过PHP代码,相信都遇上过这个大多时候都令人莫明其妙的warning吧..今天我们就来搞定它……………
看了PHP手册，回答如下：
消 息“Warning： Cannot send session cookie &#8211; headers already sent…”或者“Cannot add/modify header information &#8211; headers already sent…”。 
函 数 header()，setcookie() 和 session 函数需要在输出流中增加头信息。但是头信息只能在其它任何输出内容之前发送。在使用这些函数前不能有任何（如 HTML）的输出。函数 headers_sent() 能够检查您的脚本是否已经发送了头信息。请参阅“输出控制函数”。 
意思是：不要在使用上面的函数前有任何文字，空行，回车，空格等。但。。。问题是，这答案并不令人满意。因为往往程序在其他PHP环境下运行却正常。

首先：这错误是怎么产生的呢？让我们来看看PHP是如何处理HTTP header输出和主体输出的。
PHP 脚本开始执行时，它可以同时发送header(标题)信息和主体信息。 Header信息(来自 header() 或 SetCookie() 函数)并不会立即发送，相反，它被保存到一个列表中。 这样就可以允许你修改标题信息，包括缺省的标题(例如 Content-Type 标题）。但是，一旦脚本发送了任何非标题的输出（例如，使用 HTML 或 print() 调用)，那么PHP就必须先发送完所有的Header，然后终止 HTTP header。而后继续发送主体数据。从这时开始，任何添加或修改Header信息的试图都是不允许的，并会发送上述的错误消息之一。
好!那我们来解决它：笨方法：把错误警告全不显示! 掩耳盗铃之计
error_reporting(E_ERROR &#124; [...]]]></description>
		<wfw:commentRss>http://blog.cnlaoKe.com/2009/08/03/50/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP中文站-PHP会话(Session)使用入门</title>
		<link>http://blog.cnlaoKe.com/2009/08/03/49/</link>
		<comments>http://blog.cnlaoKe.com/2009/08/03/49/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 09:15:27 +0000</pubDate>
		<dc:creator>CNlaoKe</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.cnlaoKe.com/2009/08/03/49/</guid>
		<description><![CDATA[http://www.openphp.cn/blog.php?blog_id=10
]]></description>
		<wfw:commentRss>http://blog.cnlaoKe.com/2009/08/03/49/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>smarty的安装配置1（引用）</title>
		<link>http://blog.cnlaoKe.com/2009/08/03/47/</link>
		<comments>http://blog.cnlaoKe.com/2009/08/03/47/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 09:12:00 +0000</pubDate>
		<dc:creator>CNlaoKe</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.cnlaoKe.com/2009/08/03/47/</guid>
		<description><![CDATA[http://hi.baidu.com/persimmom1/blog/item/04457e59e806492f2834f0c5.html
]]></description>
		<wfw:commentRss>http://blog.cnlaoKe.com/2009/08/03/47/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>zend framework</title>
		<link>http://blog.cnlaoKe.com/2009/08/03/46/</link>
		<comments>http://blog.cnlaoKe.com/2009/08/03/46/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 09:11:29 +0000</pubDate>
		<dc:creator>CNlaoKe</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.cnlaoKe.com/2009/08/03/46/</guid>
		<description><![CDATA[http://framework.zend.com/
http://framework.zend.com/download/latest/
http://www.zfchina.org/
中文站点 资料
]]></description>
		<wfw:commentRss>http://blog.cnlaoKe.com/2009/08/03/46/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fckeditor php使用配置</title>
		<link>http://blog.cnlaoKe.com/2009/08/03/45/</link>
		<comments>http://blog.cnlaoKe.com/2009/08/03/45/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 09:10:55 +0000</pubDate>
		<dc:creator>CNlaoKe</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.cnlaoKe.com/2009/08/03/45/</guid>
		<description><![CDATA[fckeditor php使用配置
2009-01-19 16:11
下载地址:
http://www.fckeditor.net/download
效果演示:
http://www.fckeditor.net/demo
一:修改文件上传语言为PHP
打开fckconfig.js
找到:
 var _FileBrowserLanguage = &#8216;asp&#8217;
 var _QuickUploadLanguage = &#8216;asp&#8217;
改成:
 var _FileBrowserLanguage = &#8216;php&#8217;
 var _QuickUploadLanguage = &#8216;php&#8217;

二:启用PHP文件上传
1:启用FileBrowser:
打开fckeditor/editor/filemanager/browser/default/connectors/php/config.php
启用文件上传:
找到:
 $Config['Enabled'] = false

改成:
 $Config['Enabled'] = true

设置上传存放目录:
找到:
$Config['UserFilesPath'] = &#8216;/userfiles/&#8217;
改成:
 $Config['UserFilesPath'] = &#8216;你自己的项目路径&#8217;

2:启用QuickUpload
打开fckeditor/editor/filemanager/upload/php/config.php
启用文件上传:
找到:
$Config['Enabled'] = false
改成:
$Config['Enabled'] = true

设置上传存放目录:
找到:
$Config['UserFilesPath'] = &#8216;/userfiles/&#8217;
改成:
 $Config['UserFilesPath'] = &#8216;你自己的项目路径&#8217;

使用实例
&#60;?php 
$fck = $_POST [ " FCKeditor1 " ] ;
if ( $fck != &#8220;&#8221; ) 
{ 
echo [...]]]></description>
		<wfw:commentRss>http://blog.cnlaoKe.com/2009/08/03/45/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>≡ Windows XP + Apache 2.2.4 + PHP 5.2.0 + MySQL 5.0.27 + Zend Optimizer 3.2.0环境配置说明 ≡</title>
		<link>http://blog.cnlaoKe.com/2009/07/21/36/</link>
		<comments>http://blog.cnlaoKe.com/2009/07/21/36/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 09:05:04 +0000</pubDate>
		<dc:creator>CNlaoKe</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.cnlaoKe.com/2009/07/21/36/</guid>
		<description><![CDATA[Apache 2.2.4 -- www.apache.com
PHP 5.2.0 -- www.php.net
MySQL 5.0.27 -- www.mysql.com
Zend Optimizer 3.2.0 -- www.zend.com
phpMyAdmin 2.9.2 -- www.phpmyadmin.net
严重注意：在进行下列操作前，Windows XP应无安装IIS、PHP、APACHE、MYSQL、ZEND。
≡ Apache 2.2.4 的安装 ≡

打开我的电脑，进入D盘，在其下新建一个文件夹，名为 local 。
到其官方站点下载 apache_2.2.4-win32-x86-no_ssl.msi 并执行。
按3次Next按钮，安装程序要求输入你的Network Domain（网络域名）、Server Domain（服务器域名）和网站管理员的E-mail，有的话就如实填写，本说明介绍的是本地自建测试环境，所以随便一下，前两个填 localhost ，邮件写自己的即可。
进入Next后，默认的安装路径是"C:\Program Files\Apache Software Foundation\Apache2.2\"，修改路径，改为前面所述的"D:\local\Apache2"。
然后一路下去，直到安装结束；此时，打开D盘下的local文件夹，可以看到有一个名为Apache2的文件夹。
打开IE，然后在地址栏输入："http://localhost" 或者 "http://127.0.0.1" 可以看到Apache安装完成的成功页面；以后网页的存在位置就在 "D:\local\Apache2\htdocs" 目录。
≡ PHP 5.2.0 的安装 ≡

到其官方站点下载 php-5.2.0-Win32.zip 并解压（在此不要下载及使用它的Installer，这种方式虽然很自动化、很智能，但也存在很多方面的限制，因为不推荐。）
将PHP文件解压到一个目录下，目录地址为 "D:\local\php"。
将PHP目录（D:\local\php）下的php.ini-dist复制到windows（有的系统是winnt目录）目录下，并改名为php.ini。
复制D:\local\php目录下的所有dll文件到windows的系统文件夹里，即：C:\windows\system32。
≡ MySQL 5.0.27 的安装 ≡

打开我的电脑，进入D:\local，在其下新建一个文件夹，名为 mysql 。
到其官方站点下载 Mysql 5.0.27 Installer 并执行。
按Next，然后选择Custom安装方式。
点击Change，改变安装路径；原路径是"C:\Program [...]]]></description>
		<wfw:commentRss>http://blog.cnlaoKe.com/2009/07/21/36/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Manual</title>
		<link>http://blog.cnlaoKe.com/2009/07/16/11/</link>
		<comments>http://blog.cnlaoKe.com/2009/07/16/11/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 07:21:31 +0000</pubDate>
		<dc:creator>CNlaoKe</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.CNlaoKe.com/2009/07/16/11/</guid>
		<description><![CDATA[http://www.php.net/manual/en/
]]></description>
		<wfw:commentRss>http://blog.cnlaoKe.com/2009/07/16/11/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
