<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<title><![CDATA[海峡IT网 - PHP]]></title>
<link>http://www.haixiait.com/</link>
<description><![CDATA[haixiaIT.COM_创造价值,传播技术,分享快乐!]]></description>
<language>zh-cn</language>
<copyright><![CDATA[Copyright 2005 PBlog3 v2.8]]></copyright>
<webMaster><![CDATA[airzen@126.com(airzen)]]></webMaster>
<generator>PBlog2 v2.4</generator> 
<image>
	<title>海峡IT网</title>
	<url>http://www.haixiait.com/images/logos.gif</url>
	<link>http://www.haixiait.com/</link>
	<description>海峡IT网</description>
</image>

			<item>
			<link>http://www.haixiait.com/article.asp?id=393</link>
			<title><![CDATA[nginx 泛域名解析]]></title>
			<author>airzen@126.com(airzen)</author>
			<category><![CDATA[PHP]]></category>
			<pubDate>Mon,21 Jun 2010 10:22:43 +0800</pubDate>
			<guid>http://www.haixiait.com/default.asp?id=393</guid>
		<description><![CDATA[<p>
<p>在dns做一条泛指到主机上，利用nginx做二级域名的rewirte</p>
<p>例如music.abc.com/index.php?id=1转到www.abc.com/music/index.php?id=1</p>
<p>server {</p>
<p>listen &nbsp; &nbsp; &nbsp; 80;</p>
<p>server_name www.abc.com;</p>
<p>access_log &nbsp;off;</p>
<p>root /usr/www/abc/;</p>
<p>location / {</p>
<p>index &nbsp;index.php index.html index.htm;</p>
<p>}</p>
<p>}</p>
<p>server {</p>
<p>server_name ~^(.*)\.abc\.com$;</p>
<p>set $name $1;</p>
<p>rewrite ^ http://www.abc.com/$name$request_uri ;</p>
<p>}</p>
</p>]]></description>
		</item>
		
			<item>
			<link>http://www.haixiait.com/article.asp?id=376</link>
			<title><![CDATA[如果你的VPS或服务器时间突然不准对uc/uch/dz中的数据进行恢复]]></title>
			<author>airzen@126.com(airzen)</author>
			<category><![CDATA[PHP]]></category>
			<pubDate>Thu,07 Jan 2010 19:27:55 +0800</pubDate>
			<guid>http://www.haixiait.com/default.asp?id=376</guid>
		<description><![CDATA[<p>一个朋友的VPS突然变成2017年了，这样直接导致好多的日期字段都是2017年的，即使你将服务器时间调回正确，数据确实是已经被记录了，犹其是一些按日期排行的数据会一直持续的挂在首页直到2017年。哈哈。。这实在有点烦人。。</p>
<p>下面说一下我的解决方法，其实很简单就是将日期差减回去就行了。</p>
<p>这个数字是当前的时间，你可以通过time函数得到 1272263385<br />
select * from `uchome_notification`&nbsp; where dateline &gt;1272263385</p>
<p>然后找到表中日期最大的那个日期，相减得到日期差&nbsp;247665335</p>
<p>下面是对相关表数据进行更新</p>
<p>update `uchome_notification` set dateline = dateline -247665335<br />
where dateline &gt;1272263385</p>
<p>&nbsp;</p>
<p><br />
update uchome_friend<br />
set dateline = dateline -247665335<br />
where dateline &gt;1272263385</p>
<p><br />
update uchome_vistor<br />
set dateline = dateline -247665335<br />
where dateline &gt;1272263385</p>
<p>update uchome_space<br />
set updatetime = updatetime - 247665335<br />
where updatetime &gt;1272263385</p>
<p>&nbsp;附康盛UCHome相关的数据字典：<a href="http://www.haixiait.com/attachments/month_1001/w201017192932.txt"><img alt="" border="0" style="margin: 0px 2px -4px 0px" src="http://www.haixiait.com/../../images/download.gif" />点击下载此文件</a>，改名为htm即可查看。<br />
&nbsp;</p>]]></description>
		</item>
		
			<item>
			<link>http://www.haixiait.com/article.asp?id=369</link>
			<title><![CDATA[uchome中用户登录表单中的formhash]]></title>
			<author>airzen@126.com(airzen)</author>
			<category><![CDATA[PHP]]></category>
			<pubDate>Tue,24 Nov 2009 17:20:23 +0800</pubDate>
			<guid>http://www.haixiait.com/default.asp?id=369</guid>
		<description><![CDATA[<p>uchome中的登录form中的隐藏表单&lt;input type=&quot;hidden&quot; name=&quot;formhash&quot; value=&quot;836a3337&quot; /&gt; 是用来判断访问来源的hash值,在进行表单登录的时候最好是从网站上的表单域中直接COPY过来.否则是没有办法进行登录的.包括登录form的action也要与原一致才可以.并且必须是本form中的submit提交按钮点击有效.如果采用js触发式的submit也是行不通的.</p>]]></description>
		</item>
		
			<item>
			<link>http://www.haixiait.com/article.asp?id=368</link>
			<title><![CDATA[dede二次开发知识点总结之-include file扩展]]></title>
			<author>airzen@126.com(airzen)</author>
			<category><![CDATA[PHP]]></category>
			<pubDate>Tue,03 Nov 2009 23:15:28 +0800</pubDate>
			<guid>http://www.haixiait.com/default.asp?id=368</guid>
		<description><![CDATA[<p>以下是dede V55_UTF8</p>
<p>查dede include标签手册</p>
<p><span style="background-color: #ffff00"><strong>(3) include</strong> 引入一个文件，形式为：<br />
{dede:include file='文件名称' ismake='是否为dede板块模板(yes/no)'/}<br />
对文件的搜索路径为顺序为：绝对路径、include文件夹，CMS安装目录，CMS主模板目录</span></p>
<p>其实根本不是这个样子的,如果你要引用一个其它目录的东西如:<br />
{dede:include filename=&quot;/haixiait/template/default/inc_head.htm&quot;/}</p>
<p>那么就会返回为空字符串,很显然,并没有对文件进行引用.下面经过改造就可以引用各个目录的文件了.(很简单,下面加粗蓝色字体为airzen修改部分)</p>
<p><strong>文件目录为:dede安装根目录/include/dedetag.class.php</strong></p>
<p>//引入文件<br />
&nbsp;function IncludeFile($filename,$ismake='no')<br />
&nbsp;{<br />
&nbsp;&nbsp;global $cfg_df_style;<br />
&nbsp;&nbsp;$restr = '';<br />
&nbsp;&nbsp;if($filename=='')<br />
&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;return '';<br />
&nbsp;&nbsp;}<br />
&nbsp;&nbsp;if( file_exists(DEDEROOT.&quot;/templets/&quot;.$filename) )<br />
&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;$okfile = DEDEROOT.&quot;/templets/&quot;.$filename;<br />
&nbsp;&nbsp;}<br />
&nbsp;&nbsp;else if(file_exists(DEDEROOT.'/templets/'.$cfg_df_style.'/'.$filename) )<br />
&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;$okfile = DEDEROOT.'/templets/'.$cfg_df_style.'/'.$filename;<br />
&nbsp;&nbsp;}<br />
<span style="color: #0000ff"><strong>&nbsp;&nbsp;else if(file_exists(DEDEROOT.$filename) )<br />
&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;$okfile = DEDEROOT.$filename;<br />
&nbsp;&nbsp;}</strong></span><br />
&nbsp;&nbsp;else<br />
&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;return &quot;无法在这个位置找到： $filename&quot;;<br />
&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;//编译<br />
&nbsp;&nbsp;if($ismake!=&quot;no&quot;)<br />
&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;require_once(DEDEINC.&quot;/channelunit.func.php&quot;);<br />
&nbsp;&nbsp;&nbsp;$dtp = new DedeTagParse();<br />
&nbsp;&nbsp;&nbsp;$dtp-&gt;LoadTemplet($okfile);<br />
&nbsp;&nbsp;&nbsp;MakeOneTag($dtp,$this-&gt;refObj);<br />
&nbsp;&nbsp;&nbsp;$restr = $dtp-&gt;GetResult();<br />
&nbsp;&nbsp;}<br />
&nbsp;&nbsp;else<br />
&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;$fp = @fopen($okfile,&quot;r&quot;);<br />
&nbsp;&nbsp;&nbsp;while($line=fgets($fp,1024)) $restr.=$line;<br />
&nbsp;&nbsp;&nbsp;fclose($fp);<br />
&nbsp;&nbsp;}<br />
&nbsp;&nbsp;return $restr;<br />
&nbsp;}</p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></description>
		</item>
		
			<item>
			<link>http://www.haixiait.com/article.asp?id=357</link>
			<title><![CDATA[取mysql表和字段注释的语句]]></title>
			<author>airzen@126.com(airzen)</author>
			<category><![CDATA[PHP]]></category>
			<pubDate>Mon,31 Aug 2009 22:42:21 +0800</pubDate>
			<guid>http://www.haixiait.com/default.asp?id=357</guid>
		<description><![CDATA[<p>取mysql表和字段注释的语句</p>
<p>取字段注释</p>
<p>Select COLUMN_NAME 列名, DATA_TYPE 字段类型, COLUMN_COMMENT 字段注释<br />
FROM INFORMATION_SCHEMA.COLUMNS<br />
Where table_name = 'companies'##表名<br />
AND table_schema = 'testhuicard'##数据库名<br />
AND column_name LIKE 'c_name'##字段名</p>
<p>Select table_name&nbsp; 表名,TABLE_COMMENT 表注释 FROM INFORMATION_SCHEMA.TABLES&nbsp; Where table_schema = 'testhuicard' ##数据库名</p>
<p>AND table_name LIKE 'companies'##表名</p>
<p>参考<a href="http://dev.mysql.com/doc/refman/5.1/zh/information-schema.html">http://dev.mysql.com/doc/refman/5.1/zh/information-schema.html</a>.<br />
mysql手册：23.1. INFORMATION_SCHEMA表</p>
<p>转载自:http://www.xiandanbi.com/article.asp?id=21</p>]]></description>
		</item>
		
			<item>
			<link>http://www.haixiait.com/article.asp?id=356</link>
			<title><![CDATA[DZ论坛所在服务器时间超时空，统计数据静止的问题解决]]></title>
			<author>airzen@126.com(airzen)</author>
			<category><![CDATA[PHP]]></category>
			<pubDate>Fri,21 Aug 2009 17:57:38 +0800</pubDate>
			<guid>http://www.haixiait.com/default.asp?id=356</guid>
		<description><![CDATA[<p>删除forumdata\runcron1.lock类型的文件&nbsp;&nbsp;后台 其它设置 计划任务&nbsp;&nbsp;手动执行下 并检查下下次执行时间</p>
<p>&nbsp;</p>]]></description>
		</item>
		
			<item>
			<link>http://www.haixiait.com/article.asp?id=348</link>
			<title><![CDATA[PHP程序员一般都忽略了的几点精华]]></title>
			<author>airzen@126.com(airzen)</author>
			<category><![CDATA[PHP]]></category>
			<pubDate>Mon,03 Aug 2009 16:53:35 +0800</pubDate>
			<guid>http://www.haixiait.com/default.asp?id=348</guid>
		<description><![CDATA[<p>1、变量、数组的应用技巧</p>
<p>(1)很多人用得不多的数组函数。foreach、list、each。分别举几个例子，应该就能知道了。例：</p>
<p><!--p<--></p>
<p>$data = array('a' =&gt; 'data1', 'b' =&gt; 'data2', 'c' =&gt; 'data3');</p>
<p>while(list($subscript, $value) = each($data))</p>
<p>{</p>
<p>echo &quot;$subscript =&gt; $value :: &quot;;</p>
<p>echo &quot;$subscript =&gt; $value\n<br />
&quot;;</p>
<p>}</p>
<p>reset($data);</p>
<p>foreach($data as $subscript =&gt; $value)</p>
<p>{</p>
<p>echo &quot;$subscript =&gt; $value :: &quot;;</p>
<p>echo &quot;$subscript =&gt; $value\n<br />
&quot;;</p>
<p>}</p>
<p>(2)函数的变量、变量的变量、变量的&ldquo;指针&rdquo;：看下例：</p>
<p><!--p<--></p>
<p>//变量的变量</p>
<p>$var = &quot;this is a var&quot;;</p>
<p>$varname = &quot;var&quot;;</p>
<p>echo $$varname;</p>
<p>//函数的变量</p>
<p>function fun1($str) {</p>
<p>echo $str;</p>
<p>}</p>
<p>$funname = &quot;fun1&quot;;</p>
<p>$funname(&quot;This is a function !&quot;);</p>
<p>?&gt;</p>
<p>变量的&ldquo;指针&rdquo;。这个指针加上了双引号，表明他不是真正的指针。看看下例：</p>
<p><!--p<--></p>
<p>function($a) {</p>
<p>$a ++;</p>
<p>}</p>
<p>$c = 0;</p>
<p>function($c);</p>
<p>echo $c; //$c仍为0</p>
<p>function(&amp;$a) {</p>
<p>$a ++;</p>
<p>}</p>
<p>$c = 0;</p>
<p>echo $c; //$c为1</p>
<p>?&gt;</p>
<p>之所以称其为&ldquo;指针&rdquo;，就是因为他有了和C语言中指针相同的功能。但这又不是真正的指针，只能够是这样的去理解。</p>
<p>2、正则表达式</p>
<p>正则表达式是一个非常大的题目，Perl的正则表达式的强大是闻了名的。而PHP也不弱，他继承了Perl的正则表达式法则，还有自己的一套法则。这里只说PHP自己的正则表达式。</p>
<p>正则表达式是最基本的元素。简单地说就是一套规则，用于去判定其它的元素是不是符合自身的规则，或者说是不是有相同的特征描述。</p>
<p>正则表达式的开始符：^，结尾符$，这两个符号间的是匹配的元素。如检查一个电话号码是不是打往北京的号，用正则表达式表示就是&ldquo;^010$&rdquo;。只要前3位区号是010，就是北京的号，后面的电话号码就不用管了。然后，用正则表达式匹配函数ereg来判断，例：</p>
<p><!--p<--></p>
<p>$pattern = &quot;^010$&quot;;</p>
<p>$phone = &quot;01080718828&quot;;</p>
<p>if(ereg($pattern, $phone))</p>
<p>echo &quot;打往北京的号&quot;;</p>
<p>else</p>
<p>echo &quot;不是打往北京的号&quot;;</p>
<p>?&gt;</p>
<p>这就是正则表达式。北京的电话都是8位数字的，那我要知道这个号码是不是正确了?假如他按了9位号呢?如果判断正误?这就要用到正则表达式的字符簇。那么上例的正则表达式就要这样写：^010[0-9]{8}$，就能同时判断号码是不是符合规则。正则表达式有很多的应用，像LBB、VBB论坛在发贴时的所谓VBB代码LBB代码的解析，都是用正则表达式完成的。</p>
<p>3、模板</p>
<p>知道了正则表达式的功能，那么就可以知道模板了。什么是模板?举个例子吧?一般写网页用到了后台程序的时候，都是在网页里面插入程序代码。如PHP。这就是HTML和PHP的混写。这样的优点是读取速度快，缺点是如果大家分工合作做网站，那么非程序员就不会改网了。</p>
<p>而用模板，则可以达到分工的最合理化。美工只做页面，程序只写后台，然后再合起来。优秀的Jsp提供了自定义标签的功能很好地完成了模板功能。而主流的PHP如何做到呢?就是利用正则表达式来做到的。可以去网上下载一个PHPLIB，里面的PHP目录下有一个template.inc的源代码文件，那就是用PHP实现模板套用的类。</p>]]></description>
		</item>
		
			<item>
			<link>http://www.haixiait.com/article.asp?id=347</link>
			<title><![CDATA[PHP任意图像裁剪成固定大小]]></title>
			<author>airzen@126.com(airzen)</author>
			<category><![CDATA[PHP]]></category>
			<pubDate>Mon,03 Aug 2009 16:32:23 +0800</pubDate>
			<guid>http://www.haixiait.com/default.asp?id=347</guid>
		<description><![CDATA[<p>做一个首页调用图像，有时候往往需要获得固定大小的图像，因为首页的图像位置通常由设计人员指定好了，如果是做最新发布图像调用，因为不知道客户会上传什么比例的图像，所以，有时候也就没有办法确定图像的比例，前台页面编写人员通常会采用固定 img 元素高宽的办法来达到控制图像不溢出，但如果图像的比例不是需要的比例，就会造成图像调用后变形，很大程度上影响了页面的美观，有解决的方法是，按照原图比例进行缩放，缩放后的图像难免会有空白，空白处填以颜色，这样虽然图像不变形了，但这样会有很多问题，比如，如果用户发一个图像很高但宽度一般的图像，如果压缩成一个1：1的图像，那么压缩后基本就会看不到图像了。<br />
我这里的解决办法是，任意图像裁剪成固定大小，图像不变形，空白处拉伸填充，图像始终铺满，不留空白，用过bcastr的朋友应该知道，bcastr就是保证了图像调用的不变形，对一个固定大小输出的图像框，源图有以下几种情况：</p>
<p>1：需要输出的图像的高宽比源图的高宽都小，写成判断 $new_width&lt;$src_width &amp;&amp; $new_height&lt;$src_width</p>
<p>2：需要输出的图像的高宽比原图的高宽都大，写成判断 $new_width&gt;$src_width &amp;&amp; $new_height&gt;$src_width</p>
<p>3：排除第1，2两种，即一边放大，一边缩小的情况加上等于的判断</p>
<p>对于1，2，函数处理代码完全相同，所以可以归纳成一个处理语句</p>
<p>给出php实现代码</p>
<p>
<table cellspacing="0" cellpadding="6" width="95%" align="center" border="0" style="border-right: #0099cc 1px solid; table-layout: fixed; border-top: #0099cc 1px solid; border-left: #0099cc 1px solid; border-bottom: #0099cc 1px solid">
    <tbody>
        <tr>
            <td bgcolor="#ddedfb" style="word-wrap: break-word">
            <p><font color="#ff0000">以下为引用的内容：</font></p>
            <p>&lt;?php<br />
            /*<br />
            *说明：函数功能是把一个图像裁剪为任意大小的图像，图像不变形<br />
            * 参数说明：输入 需要处理图片的 文件名，生成新图片的保存文件名，生成新图片的宽，生成新图片的高<br />
            * written by smallchicken<br />
            * time 2008-12-18<br />
            */<br />
            // 获得任意大小图像，不足地方拉伸，不产生变形，不留下空白<br />
            function my_image_resize($src_file, $dst_file , $new_width , $new_height) {<br />
            if($new_width &lt;1 || $new_height &lt;1) {<br />
            echo &quot;params width or height error !&quot;;<br />
            exit();<br />
            }<br />
            if(!file_exists($src_file)) {<br />
            echo $src_file . &quot; is not exists !&quot;;<br />
            exit();<br />
            }<br />
            // 图像类型<br />
            $type=exif_imagetype($src_file);<br />
            $support_type=array(IMAGETYPE_JPEG , IMAGETYPE_PNG , IMAGETYPE_GIF);<br />
            if(!in_array($type, $support_type,true)) {<br />
            echo &quot;this type of image does not support! only support jpg , gif or png&quot;;<br />
            exit();<br />
            }<br />
            //Load image<br />
            switch($type) {<br />
            case IMAGETYPE_JPEG :<br />
            $src_img=imagecreatefromjpeg($src_file);<br />
            break;<br />
            case IMAGETYPE_PNG :<br />
            $src_img=imagecreatefrompng($src_file);<br />
            break;<br />
            case IMAGETYPE_GIF :<br />
            $src_img=imagecreatefromgif($src_file);<br />
            break;<br />
            default:<br />
            echo &quot;Load image error!&quot;;<br />
            exit();<br />
            }<br />
            $w=imagesx($src_img);<br />
            $h=imagesy($src_img);<br />
            $ratio_w=1.0 * $new_width / $w;<br />
            $ratio_h=1.0 * $new_height / $h;<br />
            $ratio=1.0;<br />
            // 生成的图像的高宽比原来的都小，或都大 ，原则是 取大比例放大，取大比例缩小（缩小的比例就比较小了）<br />
            if( ($ratio_w &lt; 1 &amp;&amp; $ratio_h &lt; 1) || ($ratio_w &gt; 1 &amp;&amp; $ratio_h &gt; 1)) {<br />
            if($ratio_w &lt; $ratio_h) {<br />
            $ratio = $ratio_h ; // 情况一，宽度的比例比高度方向的小，按照高度的比例标准来裁剪或放大<br />
            }else {<br />
            $ratio = $ratio_w ;<br />
            }<br />
            // 定义一个中间的临时图像，该图像的宽高比 正好满足目标要求<br />
            $inter_w=(int)($new_width / $ratio);<br />
            $inter_h=(int) ($new_height / $ratio);<br />
            $inter_img=imagecreatetruecolor($inter_w , $inter_h);<br />
            imagecopy($inter_img, $src_img, 0,0,0,0,$inter_w,$inter_h);<br />
            // 生成一个以最大边长度为大小的是目标图像$ratio比例的临时图像<br />
            // 定义一个新的图像<br />
            $new_img=imagecreatetruecolor($new_width,$new_height);<br />
            imagecopyresampled($new_img,$inter_img,0,0,0,0,$new_width,$new_height,$inter_w,$inter_h);<br />
            switch($type) {<br />
            case IMAGETYPE_JPEG :<br />
            imagejpeg($new_img, $dst_file,100); // 存储图像<br />
            break;<br />
            case IMAGETYPE_PNG :<br />
            imagepng($new_img,$dst_file,100);<br />
            break;<br />
            case IMAGETYPE_GIF :<br />
            imagegif($new_img,$dst_file,100);<br />
            break;<br />
            default:<br />
            break;<br />
            }<br />
            } // end if 1<br />
            // 2 目标图像 的一个边大于原图，一个边小于原图 ，先放大平普图像，然后裁剪<br />
            // =if( ($ratio_w &lt; 1 &amp;&amp; $ratio_h &gt; 1) || ($ratio_w &gt;1 &amp;&amp; $ratio_h &lt;1) )<br />
            else{<br />
            $ratio=$ratio_h&gt;$ratio_w? $ratio_h : $ratio_w; //取比例大的那个值<br />
            // 定义一个中间的大图像，该图像的高或宽和目标图像相等，然后对原图放大<br />
            $inter_w=(int)($w * $ratio);<br />
            $inter_h=(int) ($h * $ratio);<br />
            $inter_img=imagecreatetruecolor($inter_w , $inter_h);<br />
            //将原图缩放比例后裁剪<br />
            imagecopyresampled($inter_img,$src_img,0,0,0,0,$inter_w,$inter_h,$w,$h);<br />
            // 定义一个新的图像<br />
            $new_img=imagecreatetruecolor($new_width,$new_height);<br />
            imagecopy($new_img, $inter_img, 0,0,0,0,$new_width,$new_height);<br />
            switch($type) {<br />
            case IMAGETYPE_JPEG :<br />
            imagejpeg($new_img, $dst_file,100); // 存储图像<br />
            break;<br />
            case IMAGETYPE_PNG :<br />
            imagepng($new_img,$dst_file,100);<br />
            break;<br />
            case IMAGETYPE_GIF :<br />
            imagegif($new_img,$dst_file,100);<br />
            break;<br />
            default:<br />
            break;<br />
            }<br />
            }// if3<br />
            }// end function<br />
            ?&gt;</p>
            </td>
        </tr>
    </tbody>
</table>
</p>]]></description>
		</item>
		
			<item>
			<link>http://www.haixiait.com/article.asp?id=338</link>
			<title><![CDATA[Apache HTTP Server 2.2.12]]></title>
			<author>airzen@126.com(airzen)</author>
			<category><![CDATA[PHP]]></category>
			<pubDate>Tue,28 Jul 2009 03:47:22 +0800</pubDate>
			<guid>http://www.haixiait.com/default.asp?id=338</guid>
		<description><![CDATA[<p><strong>Apache HTTP Server 2.2.12版本发布</strong>，最流行的HTTP服务器软件之一.快速、可靠、可通过简单的API扩展,Perl/Python解释器可被编译到服务器中,完全免费,完全源代码开放. 如果你需要创建一个每天有数百万人访问的Web服务器,Apache可能是最佳选择.</p>
<p><img alt="" src="http://www.cnbeta.com/articles/pic/view.gif" /><b>查看:</b><a href="http://www.apache.org/dist/httpd/CHANGES_2.2.12" target="_blank">Changes with Apache 2.2.12</a><br />
<img alt="" src="http://www.cnbeta.com/articles/pic/down.gif" /><b>下载:</b><a href="http://www.apache.org/dist/httpd/binaries/win32/" target="_blank">Apache HTTP Server 2.2.12 for Windows</a> (5.19 MB)<br />
<img alt="" src="http://www.cnbeta.com/articles/pic/down.gif" /><b>下载:</b><a href="http://www.apache.org/dist/httpd/httpd-2.2.12.tar.bz2" target="_blank">Apache HTTP Server 2.2.12 for Linux</a> (4.70 MB)</p>]]></description>
		</item>
		
			<item>
			<link>http://www.haixiait.com/article.asp?id=334</link>
			<title><![CDATA[获得单汉字的首拼音字母(airzen修正版)]]></title>
			<author>airzen@126.com(airzen)</author>
			<category><![CDATA[PHP]]></category>
			<pubDate>Tue,14 Jul 2009 12:14:15 +0800</pubDate>
			<guid>http://www.haixiait.com/default.asp?id=334</guid>
		<description><![CDATA[声明，此程序也是从网上COPY而来经AIRZEN修正版本<br/>在网上搜索发现大多都是一个版本没有H开头的，却有I的，原来是把H错写成了I，但是转载的没有一个人修正的，那些只想COPY别人现成使用而不去测试的猪们，在这里AIRZEN BS一下。<br/><br/>&lt;?php<br/><br/>function getfirstchar($s0){<br/><br/>&#160;&#160;&#160;&#160;$s=mb_substr($s0,0,1,&#34;gb2312&#34;);<br/>&#160;&#160;&#160;&#160;if($s&gt;=&#39;A&#39; and $s&lt;=&#39;z&#39; )return strtoupper($s);<br/>&#160;&#160;&#160;&#160;<br/>&#160;&#160;&#160;&#160;$asc=ord($s{0})*256+ord($s{1})-65536;<br/>&#160;&#160;&#160;&#160;if($asc&gt;=-20319 and $asc&lt;=-20284)return &#34;A&#34;;<br/>&#160;&#160;&#160;&#160;if($asc&gt;=-20283 and $asc&lt;=-19776)return &#34;B&#34;;<br/>&#160;&#160;&#160;&#160;if($asc&gt;=-19775 and $asc&lt;=-19219)return &#34;C&#34;;<br/>&#160;&#160;&#160;&#160;if($asc&gt;=-19218 and $asc&lt;=-18711)return &#34;D&#34;;<br/>&#160;&#160;&#160;&#160;if($asc&gt;=-18710 and $asc&lt;=-18527)return &#34;E&#34;;<br/>&#160;&#160;&#160;&#160;if($asc&gt;=-18526 and $asc&lt;=-18240)return &#34;F&#34;;<br/>&#160;&#160;&#160;&#160;if($asc&gt;=-18239 and $asc&lt;=-17923)return &#34;G&#34;;<br/>&#160;&#160;&#160;&#160;if($asc&gt;=-17922 and $asc&lt;=-17418)return &#34;H&#34;;<br/>&#160;&#160;&#160;&#160;if($asc&gt;=-17417 and $asc&lt;=-16475)return &#34;J&#34;;<br/>&#160;&#160;&#160;&#160;if($asc&gt;=-16474 and $asc&lt;=-16213)return &#34;K&#34;;<br/>&#160;&#160;&#160;&#160;if($asc&gt;=-16212 and $asc&lt;=-15641)return &#34;L&#34;;<br/>&#160;&#160;&#160;&#160;if($asc&gt;=-15640 and $asc&lt;=-15166)return &#34;M&#34;;<br/>&#160;&#160;&#160;&#160;if($asc&gt;=-15165 and $asc&lt;=-14923)return &#34;N&#34;;<br/>&#160;&#160;&#160;&#160;if($asc&gt;=-14922 and $asc&lt;=-14915)return &#34;O&#34;;<br/>&#160;&#160;&#160;&#160;if($asc&gt;=-14914 and $asc&lt;=-14631)return &#34;P&#34;;<br/>&#160;&#160;&#160;&#160;if($asc&gt;=-14630 and $asc&lt;=-14150)return &#34;Q&#34;;<br/>&#160;&#160;&#160;&#160;if($asc&gt;=-14149 and $asc&lt;=-14091)return &#34;R&#34;;<br/>&#160;&#160;&#160;&#160;if($asc&gt;=-14090 and $asc&lt;=-13319)return &#34;S&#34;;<br/>&#160;&#160;&#160;&#160;if($asc&gt;=-13318 and $asc&lt;=-12839)return &#34;T&#34;;<br/>&#160;&#160;&#160;&#160;if($asc&gt;=-12838 and $asc&lt;=-12557)return &#34;W&#34;;<br/>&#160;&#160;&#160;&#160;if($asc&gt;=-12556 and $asc&lt;=-11848)return &#34;X&#34;;<br/>&#160;&#160;&#160;&#160;if($asc&gt;=-11847 and $asc&lt;=-11056)return &#34;Y&#34;;<br/>&#160;&#160;&#160;&#160;if($asc&gt;=-11055 and $asc&lt;=-10247)return &#34;Z&#34;;<br/>&#160;&#160;&#160;&#160;return null;<br/>}<br/><br/>echo getfirstchar(&#39;爱&#39;);<br/><br/><br/>?&gt;<br/><br/>]]></description>
		</item>
		
</channel>
</rss>







