<?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>Justin's Tech Blog &#187; General</title>
	<atom:link href="http://www.sofee.cn/blog/category/technical/php/general/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sofee.cn/blog</link>
	<description>世界其实很简单，复杂的是人；生活其实很轻松，沉重的是感情！</description>
	<lastBuildDate>Sun, 17 Jan 2010 17:17:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Howto Install Oracle Berkeley DB on Linux</title>
		<link>http://www.sofee.cn/blog/2007/08/18/100/</link>
		<comments>http://www.sofee.cn/blog/2007/08/18/100/#comments</comments>
		<pubDate>Sat, 18 Aug 2007 05:45:30 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Berkeley DB]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Berkeley-DB]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Db4]]></category>
		<category><![CDATA[Db4Cursor]]></category>
		<category><![CDATA[Db4Env]]></category>
		<category><![CDATA[Db4Txn]]></category>
		<category><![CDATA[ldconfig]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[php_db4]]></category>
		<category><![CDATA[php_dba]]></category>

		<guid isPermaLink="false">http://www.sofee.cn/blog/2007/08/18/100/</guid>
		<description><![CDATA[Berkeley DB是由美国Sleepycat Software公司开发的一套开放源代码的嵌入式数据库管理系统（已被Oracle收购），它为应用程序提供可伸缩的、高性能的、有事务保护功能的数据管理服务。
Berkeley DB为许多编程语言提供了实用的api接口，包括c、c++、java、perl、tcl、python和php等。所有同数据库相关的操作都由Berkeley DB函数库负责统一完成。
官方地址为：http://www.oracle.com/technology/products/berkeley-db/db/index.html
本文就先讲一下如何在CentOS下安装Berkeley DB数据库(其他系统类似)。
1、安装Berkeley DB

# cd /usr/local/src
# wget http://download.oracle.com/berkeley-db/db-4.6.18.tar.gz
# tar -zxvf db-4.6.18.tar.gz
# cd db-4.6.18
# cd build_unix

Berkeley DB默认是安装在/usr/local/BerkeleyDB.4.6目录下，其中4.6就是版本号，你也可以指定&#8211;prefix参数来设置安装目录。

# ../dist/configure --prefix=/usr/local/berkeleydb --enable-cxx

其中&#8211;enable-cxx就是编译C++库，这样才能编译Berkeley DB数据库的PHP扩展php_db4。

# make
# make install


# echo '/usr/local/berkeleydb/lib/' &#62;&#62; /etc/ld.so.conf
# ldconfig

这2句的作用就是通知系统Berkeley DB的动态链接库在/usr/local/berkeleydb/lib/目录。
至此，Berkeley DB数据库已经安装完成。

2、安装Berkeley DB的PHP扩展
虽然PHP里已经自带了php_db和php_dba两个扩展都支持Berkekey DB，但是毕竟支持的有限，所以还是编译Berkeley DB自带的php_db4扩展好。

# cd /usr/local/src/db-4.6.18/php_db4/
# phpize
# ./configure --with-db4=/usr/local/berkeleydb/
# make
# make install

至此db4已编译好在/usr/lib64/php/modules/db4.so目录(具体跟你的系统有关)

echo 'extension=db4.so' &#62; /etc/php.d/db4.ini

重起WEB服务器(Apache等)
至此php_db4扩展的安装也完成了，执行php -m即可看到db4扩展已经加载了。
3、测试php_db4扩展php_db4提供了下面4个类：

class Db4Env &#123;
    function Db4Env&#40;$flags [...]]]></description>
		<wfw:commentRss>http://www.sofee.cn/blog/2007/08/18/100/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>[小技巧]记录PHP错误日志</title>
		<link>http://www.sofee.cn/blog/2007/08/06/96/</link>
		<comments>http://www.sofee.cn/blog/2007/08/06/96/#comments</comments>
		<pubDate>Mon, 06 Aug 2007 08:26:42 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[display_errors]]></category>
		<category><![CDATA[error_log]]></category>
		<category><![CDATA[syslog]]></category>

		<guid isPermaLink="false">http://www.sofee.cn/blog/2007/08/06/96/</guid>
		<description><![CDATA[ 
var alimama_pid="mm_10006029_103557_106167"; 
var alimama_titlecolor="8ab459"; 
var alimama_descolor ="888888"; 
var alimama_bgcolor="FFFFFF"; 
var alimama_bordercolor="ffffff"; 
var alimama_linkcolor="8ab459"; 
var alimama_sizecode="12"; 
var alimama_width=468; 
var alimama_height=60; 
var alimama_type=2; 
 
 
 对于PHP开发人员来说，一旦某个产品投入使用，那么第一件事就是应该将display_errors选项关闭，以免因为这些错误所透露的路径、数据库连接、数据表等信息而遭到黑客攻击。
某个产品投入使用后，难免会有错误信息，那么如何记录这些对开发人员非常有用的信息呢？
将PHP的log_errors开启即可，默认是记录到WEB服务器的日志文件里，比如Apache的error.log文件。
当然也可以记录错误日志到指定的文件中。

# vim /etc/php.ini


display_errors = Off
log_errors = On
error_log = /var/log/php-error.log

另外也可以设定error_log = syslog，使这些错误信息记录到操作系统的日志里。

  addthis_url    = 'http%3A%2F%2Fwww.sofee.cn%2Fblog%2F2007%2F08%2F06%2F96%2F';
  addthis_title  = '%5B%E5%B0%8F%E6%8A%80%E5%B7%A7%5D%E8%AE%B0%E5%BD%95PHP%E9%94%99%E8%AF%AF%E6%97%A5%E5%BF%97';
  addthis_pub    = 'sofeecn';

]]></description>
		<wfw:commentRss>http://www.sofee.cn/blog/2007/08/06/96/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP COM应用之WPS篇</title>
		<link>http://www.sofee.cn/blog/2007/07/12/86/</link>
		<comments>http://www.sofee.cn/blog/2007/07/12/86/#comments</comments>
		<pubDate>Thu, 12 Jul 2007 03:52:16 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[COM]]></category>
		<category><![CDATA[PHP5]]></category>
		<category><![CDATA[WPS]]></category>
		<category><![CDATA[WPS-Office]]></category>
		<category><![CDATA[二次开发接口]]></category>

		<guid isPermaLink="false">http://www.sofee.cn/blog/2007/07/12/86/</guid>
		<description><![CDATA[本文仅仅是一个简单的例子来演示PHP通过COM扩展来调用WPS二次开发接口.

&#60;?php
$wps = new COM&#40;&#34;WPS.application&#34;&#41; or die&#40;&#34;Can't start WPS&#34;&#41;;
try &#123;
	$wps-&#62;Visible = true;
&#160;
	// Create Document
	$doc = $wps-&#62;Documents-&#62;Add&#40;&#41;;
	$doc-&#62;Range-&#62;Text = &#34;WPS v{$wps-&#62;Version} Example&#34;;
	$doc-&#62;Paragraphs&#91;1&#93;-&#62;Alignment = 1;
	$doc-&#62;Shapes-&#62;AddPicture&#40;&#34;http://img.kingsoft.com/publish/kingsoft/images/gb/sy/logo.gif&#34;, 80, 50, 148, 60&#41;;
&#160;
	$doc-&#62;SaveAs&#40;&#34;c:/php.wps&#34;&#41;;
&#160;
	// Close
	$wps-&#62;Quit&#40;&#41;;
&#125; catch &#40;com_exception $e&#41; &#123;
	echo $e;
&#125;
?&#62;

这段代码的执行结果是会在C盘下创建一个php.wps文件,文件内容如下图所示:


  addthis_url    = 'http%3A%2F%2Fwww.sofee.cn%2Fblog%2F2007%2F07%2F12%2F86%2F';
  addthis_title  = 'PHP+COM%E5%BA%94%E7%94%A8%E4%B9%8BWPS%E7%AF%87';
  addthis_pub    = 'sofeecn';

]]></description>
		<wfw:commentRss>http://www.sofee.cn/blog/2007/07/12/86/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>使用PHP的GD库来实现截屏</title>
		<link>http://www.sofee.cn/blog/2007/07/12/83/</link>
		<comments>http://www.sofee.cn/blog/2007/07/12/83/#comments</comments>
		<pubDate>Thu, 12 Jul 2007 03:42:43 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[COM]]></category>
		<category><![CDATA[GD]]></category>
		<category><![CDATA[imagegrabscreen]]></category>
		<category><![CDATA[imagegrabwindow]]></category>
		<category><![CDATA[InternetExplorer]]></category>
		<category><![CDATA[PHP5]]></category>
		<category><![CDATA[截屏]]></category>

		<guid isPermaLink="false">http://www.sofee.cn/blog/2007/07/12/83/</guid>
		<description><![CDATA[PHP5.2.2以上版本的GD库实现了两个截屏函数imagegrabscreen和imagegrabwindow，分别用于截取整个屏幕和截取某个窗口（同ALT+PrintScreen）的屏幕。
调用方法也很简单，请看下面两个例子：

1.截取整个屏幕：

&#60;?php
$im = imagegrabscreen&#40;&#41;;
imagepng&#40;$im, &#34;gd_screen.png&#34;&#41;;
?&#62;


2.截取IE浏览器的内容：

&#60;?php
$ie = new COM&#40;&#34;InternetExplorer.Application&#34;&#41; or die&#40;&#34;Can't start Internet Explorer&#34;&#41;;
try &#123;
	$handle = $ie-&#62;HWND;
	$ie-&#62;Visible = true;
	$ie-&#62;Navigate&#40;&#34;http://www.php.net&#34;&#41;;
&#160;
	while &#40;$ie-&#62;Busy&#41; &#123;
	    com_message_pump&#40;4000&#41;;
	&#125;
&#125; catch &#40;com_exception $e&#41; &#123;
	echo $e;
&#125;
&#160;
$im = imagegrabwindow&#40;$handle, 0&#41;;
imagepng&#40;$im, &#34;gd_window.png&#34;&#41;;
$ie-&#62;Quit&#40;&#41;;
?&#62;



  addthis_url    = 'http%3A%2F%2Fwww.sofee.cn%2Fblog%2F2007%2F07%2F12%2F83%2F';
  addthis_title  = '%E4%BD%BF%E7%94%A8PHP%E7%9A%84GD%E5%BA%93%E6%9D%A5%E5%AE%9E%E7%8E%B0%E6%88%AA%E5%B1%8F';
  addthis_pub    = 'sofeecn';

]]></description>
		<wfw:commentRss>http://www.sofee.cn/blog/2007/07/12/83/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>PHP namespaces came back!</title>
		<link>http://www.sofee.cn/blog/2007/07/06/80/</link>
		<comments>http://www.sofee.cn/blog/2007/07/06/80/#comments</comments>
		<pubDate>Fri, 06 Jul 2007 02:50:56 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[ZEND API]]></category>
		<category><![CDATA[eAccelerator]]></category>
		<category><![CDATA[MMCache]]></category>
		<category><![CDATA[Namespace]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP5]]></category>
		<category><![CDATA[PHP6]]></category>
		<category><![CDATA[Zend]]></category>
		<category><![CDATA[ZEND-API]]></category>
		<category><![CDATA[Zend-Framework]]></category>
		<category><![CDATA[命名空间]]></category>

		<guid isPermaLink="false">http://www.sofee.cn/blog/2007/07/06/80/</guid>
		<description><![CDATA[近期PHP邮件列表最引人注目的应该就是namespace的开发了，Dmitry Stogov已经为PHP6打了个补丁，不过看上去已经很完美了。具体可以点这里看他发的帖子：Simple Namespace Proposal。
还记得以前PHP 5.0.0 alpha或beta的时候就已经支持namespace了，可后来推出正式版后却因为种种原因还是去掉了。现在想想namespace是越来越有用了，特别是针对Zend Framework这类框架的应用，颇有感触！希望经过这次的讨论之后会正式把这个功能加进来。

下面是相关代码的引用：

Namespaces are defined the following way:

Zend/DB/Connection.php: 
&#60;?php 
namespace Zend::DB;
&#160;
class Connection &#123;
&#125;
&#160;
function connect&#40;&#41; &#123;
&#125;
?&#62;

Namespace definition does the following:
All class and function names inside are automatically prefixed with
namespace name. Inside namespace, local name always takes precedence over
global name. It is possible to use the same namespace in several PHP files.
The namespace [...]]]></description>
		<wfw:commentRss>http://www.sofee.cn/blog/2007/07/06/80/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>自行编译安装PHP</title>
		<link>http://www.sofee.cn/blog/2007/06/25/71/</link>
		<comments>http://www.sofee.cn/blog/2007/06/25/71/#comments</comments>
		<pubDate>Mon, 25 Jun 2007 04:45:48 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[lib64]]></category>
		<category><![CDATA[libmysqlclient.so]]></category>
		<category><![CDATA[mysqlclient]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP5]]></category>

		<guid isPermaLink="false">http://www.sofee.cn/blog/2007/06/25/71/</guid>
		<description><![CDATA[实际上这种文章已经很多了，网上也到处都是，之所以写这篇文章，目的是为了解决其中一个问题。

# cd /usr/local/src
# wget http://cn.php.net/distributions/php-5.2.3.tar.gz
# tar -zxvf php-5.2.3.tar.gz
# cd php-5.2.3
# ./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --cache-file=../config.cache --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --enable-force-cgi-redirect --disable-debug --enable-pic --disable-rpath --enable-inline-optimization --with-exec-dir=/usr/bin --with-freetype-dir --with-png-dir=/usr/local --with-gd=shared --enable-gd-native-ttf --with-iconv --with-jpeg-dir=/usr/local --with-openssl --with-png --with-pcre-regex --with-zlib --with-layout=GNU --enable-magic-quotes --enable-sockets --enable-sysvsem --enable-sysvshm --enable-track-vars --enable-trans-sid --enable-memory-limit [...]]]></description>
		<wfw:commentRss>http://www.sofee.cn/blog/2007/06/25/71/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>发布最新编译的PHP中文手册</title>
		<link>http://www.sofee.cn/blog/2007/06/20/56/</link>
		<comments>http://www.sofee.cn/blog/2007/06/20/56/#comments</comments>
		<pubDate>Wed, 20 Jun 2007 10:11:13 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[manual]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[中文手册]]></category>

		<guid isPermaLink="false">http://www.sofee.cn/blog/2007/06/20/56/</guid>
		<description><![CDATA[一直觉得很奇怪，为什么PHP官方编译的PHP中文手册的索引是乱码，而自己编译的就没问题，难道那人是台湾人？或是比较喜欢用繁体字？搞的那么多国内用户看着繁体不爽，主要是索引乱码不爽。
因为自己前几年写的自己动手编译PHP手册的底稿已不存在，故在网上搜了一下，发现多如牛毛，几乎都是转载偶的那篇文章，同时也觉得可笑，以后自己的文章要是不见了，到网上一搜没准都能找到，不管有多老，呵呵。
下面附上2007年6月20日编译的PHP中文手册下载。php_manual_zh.chm.tar.gz
备注：请大家下载后，将文件名改为php_manual_zh.chm.tar.gz再解压缩，因为WordPress的原因自动将.tar.gz后缀的文件名改为tar.gz了。

  addthis_url    = 'http%3A%2F%2Fwww.sofee.cn%2Fblog%2F2007%2F06%2F20%2F56%2F';
  addthis_title  = '%E5%8F%91%E5%B8%83%E6%9C%80%E6%96%B0%E7%BC%96%E8%AF%91%E7%9A%84PHP%E4%B8%AD%E6%96%87%E6%89%8B%E5%86%8C';
  addthis_pub    = 'sofeecn';

]]></description>
		<wfw:commentRss>http://www.sofee.cn/blog/2007/06/20/56/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[老文章 ]PHP5 &amp; Web Services 系统架构图</title>
		<link>http://www.sofee.cn/blog/2006/08/23/32/</link>
		<comments>http://www.sofee.cn/blog/2006/08/23/32/#comments</comments>
		<pubDate>Wed, 23 Aug 2006 06:45:56 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[Dia]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP5]]></category>
		<category><![CDATA[SOAP]]></category>
		<category><![CDATA[WSDL]]></category>

		<guid isPermaLink="false">http://www.sofee.cn/blog/?p=32</guid>
		<description><![CDATA[注：此文章由本人CSDN上的BLOG迁移过来
最近在做一个项目，有大量的数据需要实时更新，同时要求多台服务器可共享这些数据，类似于股票系统，因此决定使用B/S+中间层三层架构，其中使用Web Services作为中间层，原因在于，从长远角度来考虑，以后可能会增加C/S结构，所以采用Web Services是个绝好的选择。
系统架构图如下：


由于考虑到PHP5已日趋成熟，且SOAP扩展也已比较完善，所以WEB服务器端脚本语言采用PHP5开发，而Web Services服务器端和MySQL数据库服务器端可考虑放在同一台服务器上。
Web Services服务器端、客户端以及WSDL等文件可采用Dia工具自动生成，非常方便！

  addthis_url    = 'http%3A%2F%2Fwww.sofee.cn%2Fblog%2F2006%2F08%2F23%2F32%2F';
  addthis_title  = '%5B%E8%80%81%E6%96%87%E7%AB%A0+%5DPHP5+%26%23038%3B+Web+Services+%E7%B3%BB%E7%BB%9F%E6%9E%B6%E6%9E%84%E5%9B%BE';
  addthis_pub    = 'sofeecn';

]]></description>
		<wfw:commentRss>http://www.sofee.cn/blog/2006/08/23/32/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[老文章]SQLite数据库安全</title>
		<link>http://www.sofee.cn/blog/2006/06/27/23/</link>
		<comments>http://www.sofee.cn/blog/2006/06/27/23/#comments</comments>
		<pubDate>Mon, 26 Jun 2006 16:12:41 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[SQLite]]></category>
		<category><![CDATA[Access]]></category>
		<category><![CDATA[CGI]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP5]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[安全]]></category>

		<guid isPermaLink="false">http://www.sofee.cn/blog/?p=23</guid>
		<description><![CDATA[相信使用PHP开发的人员一定不会对SQLite感到陌生了，PHP5已经集成了这个轻量型的数据库。SQLite�任何限制的授权协议以及支持大部分标准的SQL 92语句，相信会有越来越多的人使用这个数据库。作为WEB开发而言，PHP与SQLite的结合就如同当年的ASP与ACCESS结合一样，ACCESS可以遭遇被人下载，SQLite同样不能幸免，毕竟SQLite也是一个二进制文件，只要WEB能访问到的，就能被下载。ACCESS可以采用一些诡计来防止用户下载，SQLite同样可以，下面偶就将一些网上收集过来的解决方案贴在这里。
1、将SQLite放在WEB不能访问到的地方。
有些虚拟主机一般也都会提供一个单独目录，供用户放一些不想被下载或访问的文件，所以放在这个目录很安全。
2、如果PHP是作为CGI或者APACHE的单独进程运行，那么可以修改一下SQLite数据库文件的权限，比如0600。
3、假如WEB服务器是APACHE，并且支持自定义.htaccess，那么可在.htaccess文件中加入以下内容：

&#60;FilesMatch &#34;.sqlite$&#34;&#62;
Deny from all
&#60;/FilesMatch&#62;

其中.sqlite即为他的数据库文件的扩展名。
4、Ilia]]></description>
		<wfw:commentRss>http://www.sofee.cn/blog/2006/06/27/23/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[老文章]PHP &amp; XUL</title>
		<link>http://www.sofee.cn/blog/2004/08/30/65/</link>
		<comments>http://www.sofee.cn/blog/2004/08/30/65/#comments</comments>
		<pubDate>Mon, 30 Aug 2004 11:26:22 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[XUL]]></category>
		<category><![CDATA[FireFox]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[XAML]]></category>

		<guid isPermaLink="false">http://www.sofee.cn/blog/2004/08/30/65/</guid>
		<description><![CDATA[很早就知道XUL是什么东西，但一直未用过，直到今天在David Sklar的BLOG上看到这篇关于XUL的文章（Creating Rich Applications with Mozilla, XUL, and AMP Technology）。
一、什么是XUL？
XUL即XML-based User Interface Language的缩写，是一种基于XML的界面设计语言，提供了各种各样的元件(elements)和物件(widgets)。它可以在 Mozilla 家族的所有产品中运行。
其实就跟微软大势宣扬的XAML一样，未来没有C/S或者B/S可言。至于XUL和XAML这两者谁效仿谁，就不是我们这些最终用户该研究的了:)

二、牛刀小试

&#60;?php
function genFunctionPanel&#40;&#41; &#123;
  $exts = get_loaded_extensions&#40;&#41;;
  natsort&#40;$exts&#41;;
  $xul = '&#60;tree flex=&#34;1&#34;&#62;
      &#60;treecols&#62;
        &#60;treecol label=&#34;函数列表&#34; flex=&#34;1&#34; primary=&#34;true&#34;/&#62;
      &#60;/treecols&#62;
     [...]]]></description>
		<wfw:commentRss>http://www.sofee.cn/blog/2004/08/30/65/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>[老文章]PHP中的GOTO声明</title>
		<link>http://www.sofee.cn/blog/2004/08/02/66/</link>
		<comments>http://www.sofee.cn/blog/2004/08/02/66/#comments</comments>
		<pubDate>Mon, 02 Aug 2004 06:32:07 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[GOTO]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.sofee.cn/blog/2004/08/02/66/</guid>
		<description><![CDATA[7月29日 Sara 在新闻组发布一个引进 GOTO 声明的补丁（adding a GOTO statement to PHP），即刻在新闻组里引起了强烈凡响，正如C中的GOTO一样，即有它的好处又有它的坏处。
相关例子：

function x &#40;$a, $b&#41; &#123;
     if &#40;$b &#62; 0&#41; &#123;
          return x &#40;$a + 1, $b - 1&#41;;
     &#125; else &#123;
         [...]]]></description>
		<wfw:commentRss>http://www.sofee.cn/blog/2004/08/02/66/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[老文章]读取Lotus Notes文章列表</title>
		<link>http://www.sofee.cn/blog/2004/07/23/67/</link>
		<comments>http://www.sofee.cn/blog/2004/07/23/67/#comments</comments>
		<pubDate>Fri, 23 Jul 2004 05:16:38 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Lotus-Notes]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.sofee.cn/blog/2004/07/23/67/</guid>
		<description><![CDATA[N年前写的，两种方法：
一、直接在NOTES里写一个视图，然后用IFRAME包含，如：

&#60;iframe src=&#34;news.nsf/newinfo?OpenPage&#38;Start=1&#38;Count=1000&#38;Collapse=1.1&#34; width=&#34;150&#34; height=&#34;120&#34; vspace=0 hspace=0 frameborder=&#34;no&#34; scrolling=&#34;no&#34;&#62;&#60;/iframe&#62;

二、在NOTES里建个代理，然后用PHP里的FOPEN输出，如：

$fp = f open&#40;&#34;http://......./news.nsf/agentnotice?openagent&#34;, &#34;r&#34;&#41;;
$data = f read&#40;$fp, 10000&#41;;
$data = substr&#40;$data, 115, &#40;strlen&#40;$data&#41;-131&#41;&#41;;
echo $data;


  addthis_url    = 'http%3A%2F%2Fwww.sofee.cn%2Fblog%2F2004%2F07%2F23%2F67%2F';
  addthis_title  = '%5B%E8%80%81%E6%96%87%E7%AB%A0%5D%E8%AF%BB%E5%8F%96Lotus+Notes%E6%96%87%E7%AB%A0%E5%88%97%E8%A1%A8';
  addthis_pub    = 'sofeecn';

]]></description>
		<wfw:commentRss>http://www.sofee.cn/blog/2004/07/23/67/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[老文章]PHP &amp; JAVA</title>
		<link>http://www.sofee.cn/blog/2004/07/15/60/</link>
		<comments>http://www.sofee.cn/blog/2004/07/15/60/#comments</comments>
		<pubDate>Thu, 15 Jul 2004 13:19:41 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[J2SDK]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.sofee.cn/blog/2004/07/15/60/</guid>
		<description><![CDATA[以下方法在WIN2000 SP4 + IIS6.0 + PHP-4.3.6 + J2SDK1.4.2_04环境下测试通过。
1、下载并安装J2SDK
从官方网站下一个J2SDK，安装过程非常简单，一直下一步中途只需选择安装的路径即可，笔者是安装在 d:\j2sdk1.4.2_04 目录下，安装完成后将 d:\j2sdk1.4.2_04\bin 加入到系统的环境变量PATH中。
2、安装并配置PHP
安装PHP的方法请参考网上的一些文章，本文只介绍 JAVA 的相关配置，注意要安装成 CGI 方式，否则会出现“Unable to create Java Virtual Machine”的错误信息。笔者是安装在 d:\php-4.3.6 目录下。然后按如下方法修改 php.ini 配置文件：
1) 修改内存限制 memory_limit = 100M，默认情况下是8M，对于启动JVM来说是不够，笔者这里改为100M。

2) 加入对JAVA的支持：

&#91;Java&#93;
extension=php_java.dll
java.class.path = &#34;d:\php-4.3.6\extensions\php_java.jar&#34;
java.home = &#34;d:\j2sdk1.4.2_04\jre&#34;
java.library = &#34;d:\j2sdk1.4.2_04\jre\bin\server\jvm.dll&#34;
java.library.path = &#34;d:\php-4.3.6\extensions&#34;

顺便提一下，笔者起先是将 java.home 设为 d:\j2sdk1.4.2_04 ，但是运行后面的代码的时候会出现“can&#8217;t open d:\j2sdk1.4.2_04\lib\tzmappings.”的错误，改为 d:\j2sdk1.4.2_04\jre 后就解决了这个问题。
3) 保存php.ini
3、测试环境
查看phpinfo()，一切正常的话，即可显示如下图所示内容：

4、实例测试
以下两个例子摘自PHP MANUAL。
1)  Java Example

&#60;?php
// get instance of Java [...]]]></description>
		<wfw:commentRss>http://www.sofee.cn/blog/2004/07/15/60/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[老文章]PHP中查询SQL Server或Sybase时TEXT字段被截断的解决方案</title>
		<link>http://www.sofee.cn/blog/2004/06/26/68/</link>
		<comments>http://www.sofee.cn/blog/2004/06/26/68/#comments</comments>
		<pubDate>Sat, 26 Jun 2004 05:41:09 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SQL-Server]]></category>
		<category><![CDATA[Sybase]]></category>

		<guid isPermaLink="false">http://www.sofee.cn/blog/2007/06/21/68/</guid>
		<description><![CDATA[在CSDN的PHP版里老是看到有人问TEXT字段被截断的问题，偶也回答了无数次，今天索性就总结一下吧：
一、针对MS SQL SERVER数据库
有两种解决方案，如下：
* 修改php.ini来实现：
打开php.ini，可看到mssql.textsize，mssql.textlimit两个选项：
; Valid range 0 &#8211; 2147483647. Default = 4096.
;mssql.textlimit = 4096
; Valid range 0 &#8211; 2147483647. Default = 4096.
;mssql.textsize = 4096
可以看到默认配置为4096字节，也就是经常碰到的被截断为4K，将之改为合适的大小，去掉前面的分号，然后保存并重起WEB服务器即可。
从上面两个选项可看到范围为：0 &#8211; 2147483647字节，其实-1也可以的，查看一下PHP源代码即可发现-1表示无限制 :)
if (MS_SQL_G(textlimit) != -1) {
	sprintf(buffer, &#8220;%li&#8221;, MS_SQL_G(textlimit));
	if (DBSETOPT(mssql.link, DBTEXTLIMIT, buffer)==FAIL) {
		efree(hashed_details);
		dbfreelogin(mssql.login);
		RETURN_FALSE;
	}
}
if (MS_SQL_G(textsize) != -1) {
	sprintf(buffer, &#8220;SET TEXTSIZE %li&#8221;, MS_SQL_G(textsize));
	dbcmd(mssql.link, buffer);
	dbsqlex ec(mssql.link);
	dbresults(mssql.link);
}
* 在PHP中查询之前执行SET TEXTSIZE 合适的大小：
只需在SELECT之前执行
mssql_query(&#8220;SET TEXTSIZE 65536&#8243;);
从上面PHP源代码中可看到其实也是执行SET TEXTSIZE的 :)
二、针对Sybase数据库
由于该扩展在php.ini没有像SQL SERVER那样的选项可配置，所以只有采用上面的第二种方法，即：
在SELECT之前执行
sybase_query(&#8220;SET [...]]]></description>
		<wfw:commentRss>http://www.sofee.cn/blog/2004/06/26/68/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
