﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>PHP博客-思想之地-随笔分类-PHP技术研究</title><link>http://www.phpweblog.net/be-evil/category/224.html</link><description>思想之地,php,ajax,asp,web技术,开源</description><language>zh-cn</language><lastBuildDate>Sun, 02 Dec 2007 17:39:25 GMT</lastBuildDate><pubDate>Sun, 02 Dec 2007 17:39:25 GMT</pubDate><ttl>60</ttl><item><title>[原创]做了几道国外公司出的PHP考试题</title><link>http://www.phpweblog.net/be-evil/archive/2007/12/03/2451.html</link><dc:creator>朦胧中的罪恶</dc:creator><author>朦胧中的罪恶</author><pubDate>Sun, 02 Dec 2007 16:05:00 GMT</pubDate><guid>http://www.phpweblog.net/be-evil/archive/2007/12/03/2451.html</guid><wfw:comment>http://www.phpweblog.net/be-evil/comments/2451.html</wfw:comment><comments>http://www.phpweblog.net/be-evil/archive/2007/12/03/2451.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.phpweblog.net/be-evil/comments/commentRss/2451.html</wfw:commentRss><trackback:ping>http://www.phpweblog.net/be-evil/services/trackbacks/2451.html</trackback:ping><description><![CDATA[
		<font face="Courier New" size="2">从朋友那弄到了一套国外公司招聘程序员的PHP考试题，拿了几道很有意思的题目做了一下<br /><br />题目一：<br />Make a variable called $apple and give it the value "apple".<br />Print apple to the screen.<br />Now without doing an assignment to the $apple variable change its  <br />value so that when you do echo $apple the word "orange" is output to  <br />the screen.<br />大致意思翻译：<br />定义一个叫$apple的变量并将它的值设定为'apple'后打印出来。现在改变$apple的值为'orange'，但是不能对$apple使用任何赋值操作，也就是说当你再次打印$apple变量的时候输出的字符串为'orange'。<br /><br />解决思想：<br />PHP变量的引用<br /><br />答案代码：<br /></font>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #008080">1</span>
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								<span style="COLOR: #800080">$apple</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">apple</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">2</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">print</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$apple</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">3</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$orange</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">&amp;</span>
								<span style="COLOR: #800080">$apple</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">4</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$orange</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">orange</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">5</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">6</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">print</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$apple</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">7</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">&lt;br&gt;</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">;</span>
						</font>
				</font>
		</div>
		<p>
				<font face="Courier New" size="2">题目二：<br /><br />Create a second class, Test2, with exactly the same capability as  <br />Test1 except that the print_variables function can optionally be  <br />supplied a parameter that will either cause the output to be:<br />Var1 = XX, Var2 = YY (This should be the default case)<br />OR<br />Var2 = YY, Var1 = XX</font>
		</p>
		<p>
				<font face="Courier New" size="2">Show code for creating objects of each class and then calling the  <br />print_variables function of each object with all supported parameters.<br /><br />翻译：太简单了..自己看<br /><br />解决思想：<br />PHP类属性的使用<br /><br />答案：<br /></font>
		</p>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<span style="COLOR: #008080"> 1</span>
				<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
				<span style="COLOR: #0000ff">class</span>
				<span style="COLOR: #000000"> Test2 <br /></span>
				<span style="COLOR: #008080"> 2</span>
				<span style="COLOR: #000000">
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />{<br /></span>
				<span style="COLOR: #008080"> 3</span>
				<span style="COLOR: #000000">
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
				<span style="COLOR: #0000ff">private</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #800080">$var1</span>
				<span style="COLOR: #000000">;<br /></span>
				<span style="COLOR: #008080"> 4</span>
				<span style="COLOR: #000000">
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
				<span style="COLOR: #0000ff">private</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #800080">$var2</span>
				<span style="COLOR: #000000">;<br /></span>
				<span style="COLOR: #008080"> 5</span>
				<span style="COLOR: #000000">
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
				<span style="COLOR: #0000ff">function</span>
				<span style="COLOR: #000000"> __construct(</span>
				<span style="COLOR: #800080">$var1</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000">'</span>
				<span style="COLOR: #000000">XX</span>
				<span style="COLOR: #000000">'</span>
				<span style="COLOR: #000000">,</span>
				<span style="COLOR: #800080">$var2</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000">'</span>
				<span style="COLOR: #000000">YY</span>
				<span style="COLOR: #000000">'</span>
				<span style="COLOR: #000000">)<br /></span>
				<span style="COLOR: #008080"> 6</span>
				<span style="COLOR: #000000">
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    {<br /></span>
				<span style="COLOR: #008080"> 7</span>
				<span style="COLOR: #000000">
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
				<span style="COLOR: #800080">$this</span>
				<span style="COLOR: #000000">-&gt;</span>
				<span style="COLOR: #000000">var1 </span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #800080">$var1</span>
				<span style="COLOR: #000000">;<br /></span>
				<span style="COLOR: #008080"> 8</span>
				<span style="COLOR: #000000">
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
				<span style="COLOR: #800080">$this</span>
				<span style="COLOR: #000000">-&gt;</span>
				<span style="COLOR: #000000">var2 </span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #800080">$var2</span>
				<span style="COLOR: #000000">;<br /></span>
				<span style="COLOR: #008080"> 9</span>
				<span style="COLOR: #000000">
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }<br /></span>
				<span style="COLOR: #008080">10</span>
				<span style="COLOR: #000000">
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						<br />
				</span>
				<span style="COLOR: #008080">11</span>
				<span style="COLOR: #000000">
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
				<span style="COLOR: #0000ff">public</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">function</span>
				<span style="COLOR: #000000"> print_variables()<br /></span>
				<span style="COLOR: #008080">12</span>
				<span style="COLOR: #000000">
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    {<br /></span>
				<span style="COLOR: #008080">13</span>
				<span style="COLOR: #000000">
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
				<span style="COLOR: #0000ff">print</span>
				<span style="COLOR: #000000">(</span>
				<span style="COLOR: #000000">'</span>
				<span style="COLOR: #000000">Var1 = </span>
				<span style="COLOR: #000000">'</span>
				<span style="COLOR: #000000">.</span>
				<span style="COLOR: #800080">$this</span>
				<span style="COLOR: #000000">-&gt;</span>
				<span style="COLOR: #000000">var1</span>
				<span style="COLOR: #000000">.</span>
				<span style="COLOR: #000000">'</span>
				<span style="COLOR: #000000">,Var2 = </span>
				<span style="COLOR: #000000">'</span>
				<span style="COLOR: #000000">.</span>
				<span style="COLOR: #800080">$this</span>
				<span style="COLOR: #000000">-&gt;</span>
				<span style="COLOR: #000000">var2);<br /></span>
				<span style="COLOR: #008080">14</span>
				<span style="COLOR: #000000">
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }<br /></span>
				<span style="COLOR: #008080">15</span>
				<span style="COLOR: #000000">
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    <br /></span>
				<span style="COLOR: #008080">16</span>
				<span style="COLOR: #000000">
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
				<span style="COLOR: #008080">17</span>
				<span style="COLOR: #000000">
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						<br />
				</span>
				<span style="COLOR: #008080">18</span>
				<span style="COLOR: #000000">
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #800080">$test</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">new</span>
				<span style="COLOR: #000000"> Test2();<br /></span>
				<span style="COLOR: #008080">19</span>
				<span style="COLOR: #000000">
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #800080">$test</span>
				<span style="COLOR: #000000">-&gt;</span>
				<span style="COLOR: #000000">print_variables();<br /></span>
				<span style="COLOR: #008080">20</span>
				<span style="COLOR: #000000">
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						<br />
				</span>
				<span style="COLOR: #008080">21</span>
				<span style="COLOR: #000000">
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">unset</span>
				<span style="COLOR: #000000">(</span>
				<span style="COLOR: #800080">$test</span>
				<span style="COLOR: #000000">);<br /></span>
				<span style="COLOR: #008080">22</span>
				<span style="COLOR: #000000">
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">echo</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">&lt;br&gt;</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">;<br /></span>
				<span style="COLOR: #008080">23</span>
				<span style="COLOR: #000000">
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						<br />
				</span>
				<span style="COLOR: #008080">24</span>
				<span style="COLOR: #000000">
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #800080">$test</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">new</span>
				<span style="COLOR: #000000"> Test2(</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">YY</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">,</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">XX</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">);<br /></span>
				<span style="COLOR: #008080">25</span>
				<span style="COLOR: #000000">
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #800080">$test</span>
				<span style="COLOR: #000000">-&gt;</span>
				<span style="COLOR: #000000">print_variables();<br /></span>
				<span style="COLOR: #008080">26</span>
				<span style="COLOR: #000000">
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
						<br />
				</span>
				<span style="COLOR: #008080">27</span>
				<span style="COLOR: #000000">
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">unset</span>
				<span style="COLOR: #000000">(</span>
				<span style="COLOR: #800080">$test</span>
				<span style="COLOR: #000000">);<br /></span>
				<span style="COLOR: #008080">28</span>
				<span style="COLOR: #000000">
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">echo</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">&lt;br&gt;</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">;<br /></span>
				<span style="COLOR: #008080">29</span>
				<span style="COLOR: #000000">
						<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
		</div>
		<p>
				<br /> </p>
		<p>
				<font face="Courier New" size="2">题目三：</font>
				<br />
				<font face="Courier New" size="2">Create a class, Test3, with the following behavior:<br />The class must take a string of the format  <br />name1=value1:name2=value2:name3=value3 consisting of name and value  <br />pairs, separated by the : symbol. I must be able to enter as many  <br />pairs as I like when I call the class, the only limit is that each  <br />pair is formated as name=value and multiple pairs are separated by  <br />the : symbol.<br />When an object of the class is created it must end up with a variable  <br />for each name=value pair. The name of the variable must be the same  <br />as the name part of the substring and the value of the variable must  <br />be the same as the value part of the substring. For example:</font>
		</p>
		<p>
				<font face="Courier New" size="2">creating an object with new Test3("firstname=david:lastname=smith")  <br />must create variables within the class:<br />$firstname = "david";<br />$lastname = "smith";</font>
		</p>
		<p>
				<font face="Courier New" size="2">and new Test3("food1=pasta:food2=chocolate") must create variables  <br />within the class:<br />$food1 = "pasta";<br />$food2 = "chocolate";</font>
		</p>
		<p>
				<font face="Courier New" size="2">I should be able to use any variable names and values provided they  <br />do not include the symbols : or =</font>
		</p>
		<p>
				<font face="Courier New" size="2">You should then write a function print_all that will print the all  <br />the names of the defined variables in the class along with their  <br />values in the following format:<br />Variable 1 - Name = (whatever the actual name is), Value = (whatever  <br />the actual value is)<br />Variable 2 - Name = (whatever the actual name is), Value = (whatever  <br />the actual value is)<br />Variable 3 - Name = (whatever the actual name is), Value = (whatever  <br />the actual value is)<br />and so on until all the variables are listed.</font>
		</p>
		<p>
				<font face="Courier New" size="2">The last line of output of the print_all function should be the words  <br />"The original input was " followed by a string that is an exact  <br />representation of the string parameter supplied when creating the  <br />class object.</font>
		</p>
		<p>
				<font face="Courier New" size="2">For example, if you did new Test3("firstname=david:lastname=smith")  <br />then the print_all function should output:</font>
		</p>
		<p>
				<font face="Courier New" size="2">Variable 1 - Name = firstname, Value = david<br />Variable 2 - Name = lastname, Value = smith<br />The original imput was ("firstname=david:lastname=smith")</font>
		</p>
		<p>
				<font face="Courier New" size="2">This must work for any input string that has the correct format and  <br />you may not store the complete input string or directly output it to  <br />produce the last line of the print_all function output as that would  <br />be too easy.<br /><br />暂时没做，稍后放出答案</font>
		</p>
<img src ="http://www.phpweblog.net/be-evil/aggbug/2451.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.phpweblog.net/be-evil/" target="_blank">朦胧中的罪恶</a> 2007-12-03 00:05 <a href="http://www.phpweblog.net/be-evil/archive/2007/12/03/2451.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[原创]织梦CMS中文转换拼音函数研究</title><link>http://www.phpweblog.net/be-evil/archive/2007/05/11/1193.html</link><dc:creator>朦胧中的罪恶</dc:creator><author>朦胧中的罪恶</author><pubDate>Fri, 11 May 2007 03:38:00 GMT</pubDate><guid>http://www.phpweblog.net/be-evil/archive/2007/05/11/1193.html</guid><wfw:comment>http://www.phpweblog.net/be-evil/comments/1193.html</wfw:comment><comments>http://www.phpweblog.net/be-evil/archive/2007/05/11/1193.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.phpweblog.net/be-evil/comments/commentRss/1193.html</wfw:commentRss><trackback:ping>http://www.phpweblog.net/be-evil/services/trackbacks/1193.html</trackback:ping><description><![CDATA[
		<font face="Verdana">织梦中添加分类时填写中文分类名可以自动转换成对应的拼音,该函数位于include/inc/inc_fun_funAdmin.php 第4行到32行.织梦版本为3.1.该函数转换需要的中文拼音数据库位于include/data/pinyin.db.<br />详细分析请看代码注释,如有地方分析的不对请高人指点!</font>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008080"> 1</span>
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								<span style="COLOR: #0000ff">function</span>
								<span style="COLOR: #000000"> SpGetPinyin(</span>
								<span style="COLOR: #800080">$str</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$ishead</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$isclose</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">1</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">)<br /></span>
								<span style="COLOR: #008080"> 2</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />{<br /></span>
								<span style="COLOR: #008080"> 3</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">全部数组$pinyins</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008080"> 4</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #000000">    </span>
								<span style="COLOR: #0000ff">global</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$pinyins</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 5</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #800080">$restr</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">""</span>
								<span style="COLOR: #000000">; </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">初始化返回字符串变量</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008080"> 6</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #000000">    </span>
								<span style="COLOR: #800080">$str</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #008080">trim</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$str</span>
								<span style="COLOR: #000000">); </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">去空格</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008080"> 7</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #000000">    </span>
								<span style="COLOR: #800080">$slen</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #008080">strlen</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$str</span>
								<span style="COLOR: #000000">); </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">得到字符串长度</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008080"> 8</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #000000">    </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$slen</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #000000">2</span>
								<span style="COLOR: #000000">) </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$str</span>
								<span style="COLOR: #000000">; </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">如果小于2则返回</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008080"> 9</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #000000">    </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #008080">count</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$pinyins</span>
								<span style="COLOR: #000000">)</span>
								<span style="COLOR: #000000">==</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">) </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">如果全局数组$pingyins长度为0</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008080">10</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">    {<br /></span>
								<span style="COLOR: #008080">11</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #800080">$fp</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #008080">fopen</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #008080">dirname</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #ff00ff">__FILE__</span>
								<span style="COLOR: #000000">)</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">/../data/pinyin.db</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">r</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">);</span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">读取pinyin数据库</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008080">12</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #000000">        </span>
								<span style="COLOR: #0000ff">while</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">!</span>
								<span style="COLOR: #008080">feof</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$fp</span>
								<span style="COLOR: #000000">))</span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">循环至文件结束位置</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008080">13</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">        {<br /></span>
								<span style="COLOR: #008080">14</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #800080">$line</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #008080">trim</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #008080">fgets</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$fp</span>
								<span style="COLOR: #000000">)); </span>
								<span style="COLOR: #008000">//</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008000">从文件指针中读取一行并去除空格<br /></span>
								<span style="COLOR: #008080">15</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            //$line[0].$line[1]中文字,作为数组索引<br /></span>
								<span style="COLOR: #008080">16</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            //substr($line,3,strlen($line)-3)得到该字对应的拼音</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008080">17</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #000000">            </span>
								<span style="COLOR: #800080">$pinyins</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #800080">$line</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$line</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">]] </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #008080">substr</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$line</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #000000">3</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #008080">strlen</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$line</span>
								<span style="COLOR: #000000">)</span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000">3</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">);<br /></span>
								<span style="COLOR: #008080">18</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }<br /></span>
								<span style="COLOR: #008080">19</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #008080">fclose</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$fp</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">);<br /></span>
								<span style="COLOR: #008080">20</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }<br /></span>
								<span style="COLOR: #008080">21</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">for</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #800080">$slen</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">++</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">)<br /></span>
								<span style="COLOR: #008080">22</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    {<br /></span>
								<span style="COLOR: #008080">23</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #008080">ord</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$str</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">])</span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #000000">0x80</span>
								<span style="COLOR: #000000">) </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">如果第i的字符的ASCII编码大于0x80(确认为中文字)</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008080">24</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">        {<br /></span>
								<span style="COLOR: #008080">25</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            <br /></span>
								<span style="COLOR: #008080">26</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #800080">$c</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$str</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$str</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">+</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">];</span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">拼接字符编码</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008080">27</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #000000">            </span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">++</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">28</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #0000ff">isset</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$pinyins</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #800080">$c</span>
								<span style="COLOR: #000000">]))</span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">如果$pinyin数组中含有该索引</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008080">29</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">            {<br /></span>
								<span style="COLOR: #008080">30</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">$ishead == 0 取全部拼音</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008080">31</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #000000">                </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$ishead</span>
								<span style="COLOR: #000000">==</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">) </span>
								<span style="COLOR: #800080">$restr</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$pinyins</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #800080">$c</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">];<br /></span>
								<span style="COLOR: #008080">32</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">只取拼音第一个字母</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008080">33</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #000000">                </span>
								<span style="COLOR: #0000ff">else</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$restr</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$pinyins</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #800080">$c</span>
								<span style="COLOR: #000000">][</span>
								<span style="COLOR: #000000">0</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">];<br /></span>
								<span style="COLOR: #008080">34</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            }</span>
								<span style="COLOR: #0000ff">else</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$restr</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">_</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">如果没有索引则使用_替代</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008080">35</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">        }<br /></span>
								<span style="COLOR: #008080">36</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">else</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">( </span>
								<span style="COLOR: #008080">eregi</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">[a-z0-9]</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">,</span>
								<span style="COLOR: #800080">$str</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">]) )</span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">如果不是中文字是字母和数字</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008080">37</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">        {    <br /></span>
								<span style="COLOR: #008080">38</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #800080">$restr</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$str</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">]; </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">直接连接字符串</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008080">39</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">        }<br /></span>
								<span style="COLOR: #008080">40</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">else</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">如果都不是</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008080">41</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">        { <br /></span>
								<span style="COLOR: #008080">42</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #800080">$restr</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">.=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">_</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">;  </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">使用_替代</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008080">43</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">        }<br /></span>
								<span style="COLOR: #008080">44</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }<br /></span>
								<span style="COLOR: #008080">45</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">根据参数注销$pinyins</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008080">46</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #000000">    </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$isclose</span>
								<span style="COLOR: #000000">==</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">) </span>
								<span style="COLOR: #0000ff">unset</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$pinyins</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">);<br /></span>
								<span style="COLOR: #008080">47</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">返回转换好的拼音</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #008080">48</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #000000">    </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$restr</span>
						</font>
				</font>
				<font face="Verdana">
						<font size="3">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">49</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}</span>
						</font>
				</font>
		</div>
<img src ="http://www.phpweblog.net/be-evil/aggbug/1193.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.phpweblog.net/be-evil/" target="_blank">朦胧中的罪恶</a> 2007-05-11 11:38 <a href="http://www.phpweblog.net/be-evil/archive/2007/05/11/1193.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[原创]isset(),empty()区别不完全研究.</title><link>http://www.phpweblog.net/be-evil/archive/2007/05/08/1185.html</link><dc:creator>朦胧中的罪恶</dc:creator><author>朦胧中的罪恶</author><pubDate>Tue, 08 May 2007 07:57:00 GMT</pubDate><guid>http://www.phpweblog.net/be-evil/archive/2007/05/08/1185.html</guid><wfw:comment>http://www.phpweblog.net/be-evil/comments/1185.html</wfw:comment><comments>http://www.phpweblog.net/be-evil/archive/2007/05/08/1185.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.phpweblog.net/be-evil/comments/commentRss/1185.html</wfw:commentRss><trackback:ping>http://www.phpweblog.net/be-evil/services/trackbacks/1185.html</trackback:ping><description><![CDATA[
		<font face="Courier New" size="2">运行以下代码:<br /></font>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #008080">  1</span>
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								<span style="COLOR: #000000">&lt;?</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">php error_reporting(E_ALL);<br /></span>
								<span style="COLOR: #008080">  2</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;B&gt;未定义$var&lt;/b&gt;&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">  3</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">isset测试:&lt;Br&gt;</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">  4</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000"> (</span>
								<span style="COLOR: #0000ff">isset</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$var</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">))<br /></span>
								<span style="COLOR: #008080">  5</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />{<br /></span>
								<span style="COLOR: #008080">  6</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">变量$var存在!&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000"> ;<br /></span>
								<span style="COLOR: #008080">  7</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
								<span style="COLOR: #008080">  8</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080">  9</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080"> 10</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">empty测试:&lt;Br&gt;</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 11</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000"> (</span>
								<span style="COLOR: #0000ff">empty</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$var</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">)){<br /></span>
								<span style="COLOR: #008080"> 12</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">变量$var的值为空&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 13</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
								<span style="COLOR: #008080"> 14</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">else</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">
						<font face="Courier New" size="2"> 15</font>
				</span>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />{<br /></span>
								<span style="COLOR: #008080"> 16</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">变量$var的值不为空&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 17</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
								<span style="COLOR: #008080"> 18</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080"> 19</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">变量直接测试:&lt;Br&gt;</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 20</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000"> (</span>
								<span style="COLOR: #800080">$var</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">){<br /></span>
								<span style="COLOR: #008080"> 21</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">变量$var存在!&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 22</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
								<span style="COLOR: #008080"> 23</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">else</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">{<br /></span>
								<span style="COLOR: #008080"> 24</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">变量$var不存在!&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 25</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
								<span style="COLOR: #008080"> 26</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080"> 27</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">----------------------------------&lt;br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 28</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;B&gt;$var = \</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">\</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;/b&gt;&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 29</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">isset测试:&lt;Br&gt;</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 30</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$var</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">''</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 31</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000"> (</span>
								<span style="COLOR: #0000ff">isset</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$var</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">))<br /></span>
								<span style="COLOR: #008080"> 32</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />{<br /></span>
								<span style="COLOR: #008080"> 33</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">变量$var存在!&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000"> ;<br /></span>
								<span style="COLOR: #008080"> 34</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
								<span style="COLOR: #008080"> 35</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080"> 36</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080"> 37</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">empty测试:&lt;Br&gt;</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 38</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000"> (</span>
								<span style="COLOR: #0000ff">empty</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$var</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">)){<br /></span>
								<span style="COLOR: #008080"> 39</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">变量$var的值为空&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 40</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
								<span style="COLOR: #008080"> 41</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">else</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">
						<font face="Courier New" size="2"> 42</font>
				</span>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />{<br /></span>
								<span style="COLOR: #008080"> 43</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">变量$var的值不为空&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 44</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
								<span style="COLOR: #008080"> 45</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080"> 46</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">变量直接测试:&lt;Br&gt;</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 47</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000"> (</span>
								<span style="COLOR: #800080">$var</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">){<br /></span>
								<span style="COLOR: #008080"> 48</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">变量$var存在!&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 49</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
								<span style="COLOR: #008080"> 50</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">else</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">{<br /></span>
								<span style="COLOR: #008080"> 51</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">变量$var不存在!&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 52</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
								<span style="COLOR: #008080"> 53</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">----------------------------------&lt;br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 54</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;B&gt;$var = 0&lt;/b&gt;&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 55</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">isset测试:&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 56</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$var</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">0</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 57</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000"> (</span>
								<span style="COLOR: #0000ff">isset</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$var</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">))<br /></span>
								<span style="COLOR: #008080"> 58</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />{<br /></span>
								<span style="COLOR: #008080"> 59</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">变量$var存在!&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000"> ;<br /></span>
								<span style="COLOR: #008080"> 60</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
								<span style="COLOR: #008080"> 61</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080"> 62</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080"> 63</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">empty测试:&lt;Br&gt;</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 64</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000"> (</span>
								<span style="COLOR: #0000ff">empty</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$var</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">)){<br /></span>
								<span style="COLOR: #008080"> 65</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">变量$var的值为空&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 66</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
								<span style="COLOR: #008080"> 67</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">else</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">
						<font face="Courier New" size="2"> 68</font>
				</span>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />{<br /></span>
								<span style="COLOR: #008080"> 69</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">变量$var的值不为空&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 70</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
								<span style="COLOR: #008080"> 71</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080"> 72</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">变量直接测试:&lt;Br&gt;</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 73</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000"> (</span>
								<span style="COLOR: #800080">$var</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">){<br /></span>
								<span style="COLOR: #008080"> 74</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">变量$var存在!&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 75</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
								<span style="COLOR: #008080"> 76</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">else</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">{<br /></span>
								<span style="COLOR: #008080"> 77</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">变量$var不存在!&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 78</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
								<span style="COLOR: #008080"> 79</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">----------------------------------&lt;br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 80</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080"> 81</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;B&gt;$var = null&lt;/b&gt;&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 82</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">isset测试:&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 83</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$var</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">null</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 84</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000"> (</span>
								<span style="COLOR: #0000ff">isset</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$var</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">))<br /></span>
								<span style="COLOR: #008080"> 85</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />{<br /></span>
								<span style="COLOR: #008080"> 86</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">变量$var存在!&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000"> ;<br /></span>
								<span style="COLOR: #008080"> 87</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
								<span style="COLOR: #008080"> 88</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080"> 89</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080"> 90</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">empty测试:&lt;Br&gt;</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 91</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000"> (</span>
								<span style="COLOR: #0000ff">empty</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$var</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">)){<br /></span>
								<span style="COLOR: #008080"> 92</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">变量$var的值为空&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 93</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
								<span style="COLOR: #008080"> 94</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">else</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">
						<font face="Courier New" size="2"> 95</font>
				</span>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />{<br /></span>
								<span style="COLOR: #008080"> 96</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">变量$var的值不为空&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080"> 97</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
								<span style="COLOR: #008080"> 98</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080"> 99</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">变量直接测试:&lt;Br&gt;</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">100</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000"> (</span>
								<span style="COLOR: #800080">$var</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">){<br /></span>
								<span style="COLOR: #008080">101</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">变量$var存在!&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">102</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
								<span style="COLOR: #008080">103</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">else</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">{<br /></span>
								<span style="COLOR: #008080">104</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">变量$var不存在!&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">105</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
								<span style="COLOR: #008080">106</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">----------------------------------&lt;br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">107</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080">108</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080">109</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">&lt;B&gt;$var = "php"&lt;/b&gt;&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">110</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">isset测试:&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">111</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #800080">$var</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">php</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">112</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000"> (</span>
								<span style="COLOR: #0000ff">isset</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$var</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">))<br /></span>
								<span style="COLOR: #008080">113</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />{<br /></span>
								<span style="COLOR: #008080">114</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">变量$var存在!&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000"> ;<br /></span>
								<span style="COLOR: #008080">115</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
								<span style="COLOR: #008080">116</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080">117</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080">118</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">empty测试:&lt;Br&gt;</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">119</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000"> (</span>
								<span style="COLOR: #0000ff">empty</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$var</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">)){<br /></span>
								<span style="COLOR: #008080">120</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">变量$var的值为空&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">121</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
								<span style="COLOR: #008080">122</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">else</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">
						<font face="Courier New" size="2">123</font>
				</span>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />{<br /></span>
								<span style="COLOR: #008080">124</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">变量$var的值不为空&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">125</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
								<span style="COLOR: #008080">126</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080">127</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">变量直接测试:&lt;Br&gt;</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">128</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000"> (</span>
								<span style="COLOR: #800080">$var</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">){<br /></span>
								<span style="COLOR: #008080">129</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">变量$var存在!&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">130</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
								<span style="COLOR: #008080">131</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">else</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">{<br /></span>
								<span style="COLOR: #008080">132</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">变量$var不存在!&lt;Br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">133</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />}<br /></span>
								<span style="COLOR: #008080">134</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #0000ff">echo</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">----------------------------------&lt;br&gt;</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">135</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080">136</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #000000">?&gt;</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #008080">137</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
						</font>
				</font>
		</div>
		<br />
		<font face="Courier New" size="2">输出:<br /></font>
		<font size="2">
				<font face="Courier New">
						<strong>未定义$var<br /></strong>isset测试:<br />empty测试:<br />变量$var的值为空<br />变量直接测试:<br />变量$var不存在!<br />----------------------------------<br /><b>$var = ''</b><br />isset测试:<br />变量$var存在!<br />empty测试:<br />变量$var的值为空<br />变量直接测试:<br />变量$var不存在!<br />----------------------------------<br /><b>$var = 0</b><br />isset测试:<br />变量$var存在!<br />empty测试:<br />变量$var的值为空<br />变量直接测试:<br />变量$var不存在!<br />----------------------------------<br /><b>$var = null</b><br />isset测试:<br />empty测试:<br />变量$var的值为空<br />变量直接测试:<br />变量$var不存在!<br />----------------------------------<br /><b>$var = "php"</b><br />isset测试:<br />变量$var存在!<br />empty测试:<br />变量$var的值不为空<br />变量直接测试:<br />变量$var存在!<br />----------------------------------<br />请注意20行会触发一个<strong>Notice:</strong></font>
		</font>
		<font size="2">
				<font face="Courier New">
						<font color="#000000">Undefined variable: var ;因为使用一个未初始化的变量不规范.<br /></font>isset()和empty()的区别一目了然..<br />具体原理请参照手册...</font>
		</font>
<img src ="http://www.phpweblog.net/be-evil/aggbug/1185.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.phpweblog.net/be-evil/" target="_blank">朦胧中的罪恶</a> 2007-05-08 15:57 <a href="http://www.phpweblog.net/be-evil/archive/2007/05/08/1185.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[原创]织梦CMS内容分类排序的实现方法研究</title><link>http://www.phpweblog.net/be-evil/archive/2007/04/11/1107.html</link><dc:creator>朦胧中的罪恶</dc:creator><author>朦胧中的罪恶</author><pubDate>Tue, 10 Apr 2007 16:41:00 GMT</pubDate><guid>http://www.phpweblog.net/be-evil/archive/2007/04/11/1107.html</guid><wfw:comment>http://www.phpweblog.net/be-evil/comments/1107.html</wfw:comment><comments>http://www.phpweblog.net/be-evil/archive/2007/04/11/1107.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.phpweblog.net/be-evil/comments/commentRss/1107.html</wfw:commentRss><trackback:ping>http://www.phpweblog.net/be-evil/services/trackbacks/1107.html</trackback:ping><description><![CDATA[
		<p>
				<font face="Courier New" size="2">织梦CMS的分类排序是如何实现的呢,下面来简单分析一下:<br />在管理页面的分类列表中每一个分类后都有一个表单域<br />&lt;input type='text' name='sortrank1' value='1'&gt;<br />其中sortrank是固定的,后面的数字是该项分类的ID字段号.value则是该分类已经存储的排序值.<br />点击排序按钮后,表单提交到服务器,那么我们来看以下服务器端是如何处理排序信息的:<br />下面的代码位于dede/catalog_do.php第129-141行,具体原理请看代码注释<br /></font>
		</p>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #008080"> 1</span>
								<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">实例化数据库访问类</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #008080"> 2</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #000000">    </span>
								<span style="COLOR: #800080">$dsql</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">new</span>
								<span style="COLOR: #000000"> DedeSql(</span>
								<span style="COLOR: #0000ff">false</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">);<br /></span>
								<span style="COLOR: #008080"> 3</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">读取一个记录集,得到arctype表中最大的ID号码 </span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #008080"> 4</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #000000">    </span>
								<span style="COLOR: #800080">$row</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$dsql</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">GetOne(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">Select ID From #@__arctype order by ID desc</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">);<br /></span>
								<span style="COLOR: #008080"> 5</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">判断是否含有记录</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #008080"> 6</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #000000">    </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #008080">is_array</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$row</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">))<br /></span>
								<span style="COLOR: #008080"> 7</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    {<br /></span>
								<span style="COLOR: #008080"> 8</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">得到最大ID号</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #008080"> 9</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #000000">        </span>
								<span style="COLOR: #800080">$maxID</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #800080">$row</span>
								<span style="COLOR: #000000">[</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">ID</span>
								<span style="COLOR: #000000">'</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">];<br /></span>
								<span style="COLOR: #008080">10</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">从1循环自最大ID号</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #008080">11</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #000000">        </span>
								<span style="COLOR: #0000ff">for</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">&lt;=</span>
								<span style="COLOR: #800080">$maxID</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">++</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">)<br /></span>
								<span style="COLOR: #008080">12</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        {<br /></span>
								<span style="COLOR: #008080">13</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            </span>
								<span style="COLOR: #008000">//</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #008000">如果从表单Post过来的sortrank$i的值不为空(说明该表单域存在)<br /></span>
								<span style="COLOR: #008080">14</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            //例如 id为45的分类的表单域名称为sortrank45 <br /></span>
								<span style="COLOR: #008080">15</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            //那么到服务器端就会自动生成一个名为$sortrank45的变量,该变量的值就为表单域sortrank45的值<br /></span>
								<span style="COLOR: #008080">16</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            //得到这些后我们可以用sql语句更新id为45的分类的sortrank字段的数据为$sortrank45的值</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #008080">17</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #000000">            </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #0000ff">isset</span>
								<span style="COLOR: #000000">(${</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">sortrank</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$i</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">})){<br /></span>
								<span style="COLOR: #008080">18</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />                </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">那么更新arctype表中id为$i的排序值为sortrank$i的值</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #008080">19</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #000000">                </span>
								<span style="COLOR: #800080">$dsql</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">ExecuteNoneQuery(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">Update #@__arctype set sortrank='</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">(${</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">sortrank</span>
								<span style="COLOR: #000000">'</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #800080">$i</span>
								<span style="COLOR: #000000">})</span>
								<span style="COLOR: #000000">.</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">' where ID='{$i}';</span>
								<span style="COLOR: #000000">"</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">);<br /></span>
								<span style="COLOR: #008080">20</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />            }<br /></span>
								<span style="COLOR: #008080">21</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />        }<br /></span>
								<span style="COLOR: #008080">22</span>
						</font>
				</font>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    }<br /></span>
								<span style="COLOR: #008080">23</span>
								<span style="COLOR: #000000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />    </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">关闭数据库连接</span>
						</font>
				</font>
				<span style="COLOR: #008000">
						<br />
				</span>
				<font face="Courier New">
						<font size="2">
								<span style="COLOR: #008080">24</span>
								<span style="COLOR: #008000">
										<img src="http://www.phpweblog.net/images/OutliningIndicators/None.gif" align="top" />
								</span>
								<span style="COLOR: #000000">    </span>
								<span style="COLOR: #800080">$dsql</span>
								<span style="COLOR: #000000">-&gt;</span>
								<span style="COLOR: #000000">Close();</span>
						</font>
				</font>
		</div>
<img src ="http://www.phpweblog.net/be-evil/aggbug/1107.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.phpweblog.net/be-evil/" target="_blank">朦胧中的罪恶</a> 2007-04-11 00:41 <a href="http://www.phpweblog.net/be-evil/archive/2007/04/11/1107.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>