<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title><![CDATA[小五的博客]]></title> 
<description><![CDATA[欢迎来到小五的博客!]]></description>
<link>http://blog.51soump3.com</link>
<language>zh-cn</language>
<generator>www.emlog.net</generator>

<item>
	<title>硬盘分区整数大小计算[附运算公式和公式计算器]</title>
	<link>http://blog.51soump3.com/?action=showlog&amp;gid=72</link>
	<description><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000080"><span>大家分区的时侯都会输入欲分区的大小，比如你想得到一个20G的分区，你也许会输入20000M或者20480M。（按照硬盘厂商的设计1GB＝1000Mb，而微软等公司推出的操作系统却认为1Gb＝1024Mb），可即使您输入1024Mb的整数倍，进入windows后，您却发现硬盘分区大小还是被识别为19.5G，而不是我们希望的20.0G整数容量。为什么呢？</span><br /></span>　　<span style="color: #000080"><span>现在的大容量硬盘越来越多，所以硬盘的分区就显得很重要了。怎样才能做到更精确的分区容量呢？这里分区计算存在误差，既不是标准的 1024 也不是工业上面的 1000，而是：</span></span><span style="color: #008080"><br /><br /><span style="color: #800080"><span><span><span style="font-size: 14pt">(</span></span></span></span><span style="color: #ff0000"><span style="font-size: 14pt"><strong>A</strong><span style="color: #800080">－1)&times;4+1024&times;</span><strong>A</strong><span style="color: #800080">=</span><strong>Y</strong></span><br /><br /><strong>A</strong> <span style="color: #99cc00">&mdash; 你想要得到的整数分区的数值（单位为：GB）</span><br /><strong>Y</strong> </span><span style="color: #99cc00"><span>&mdash; 你分区时应该输入的数字（单位为：MB）<br /></span></span><br /></span><a id="ematt:60" target="_blank" href="http://blog.51soump3.com/uploadfile/200811/dd3fe3dda0529403272c87d1fbbb7ba320081120203550.jpg"><img alt="点击查看原图" border="0" src="http://blog.51soump3.com/uploadfile/200811/thum-dd3fe3dda0529403272c87d1fbbb7ba320081120203550.jpg" /></a><br /><span style="color: #ff6600"><strong>例如：</strong><br />(10－1)&times;4+1024&times;10=10276&nbsp;&nbsp;&mdash;&mdash; 10G <br />(5－1)&times;4+1024&times;5=5136&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&mdash;&mdash; 5G <br />(15－1)&times;4+1024&times;15=15416&nbsp;&nbsp;&mdash;&mdash; 15G <br />(20－1)&times;4+1024&times;20=20556&nbsp;&nbsp;&mdash;&mdash; 20G</span><br /><br /><span style="color: #808000"><strong>javascript公式计算器</strong></span><br /><span style="color: #800000"><span style="background-color: #ffffff"><span><span><span><span>&lt;SCRIPT LANGUAGE=&quot;JavaScript&quot;&gt;<br />&lt;!--<br />function calcMB(i){<br />if(!isNaN(i)){<br />if(i&gt;0){<br />return (i-1)*4+1024*i;<br />}else{<br />alert('输入错误，请输入正数！');<br />return 0;<br />}<br />}else{<br />alert('输入错误，请输入数字！');<br />return 0;<br />}<br />}<br />function makeTable(){<br />html='&lt;table border=1&nbsp; style=&quot;font-size:10.5pt;color:#666666&quot;&gt;';<br />html+=&quot;&lt;tr bgcolor=silver&gt;&lt;td&gt;分区大小（G）&lt;/td&gt;&lt;td&gt;设置大小（MB）&lt;/td&gt;&lt;/tr&gt;&quot;;<br />for(var i=1;i&lt;=100;i++){<br />html+=&quot;&lt;tr&gt;&lt;td&gt;&quot;+i+&quot; G&lt;/td&gt;&lt;td&gt;&quot;+calcMB(i)+&quot; MB&lt;/td&gt;&lt;/tr&gt;&quot;;<br />}<br />html+=&quot;&lt;/table&gt;&quot;;<br />document.all.t.innerHTML=html;<br />}<br />//--&gt;<br />&lt;/SCRIPT&gt;<br />分区大小显示为整数的计算方法：&lt;BR&gt;<br />想要的大小为G，单位是GB，计算分区设置大小M的公式：&lt;BR&gt;<br />&lt;H3&gt;M=(G-1)*4+1024*G&lt;/H3&gt;<br />例如：如要2GB的分区，就是2052MB。&nbsp; &lt;BR&gt;<br />&lt;FORM name=&quot;form1&quot;&gt;<br />分区大小：&lt;INPUT TYPE=&quot;text&quot; NAME=&quot;G&quot; size=3&gt;（G）&lt;INPUT TYPE=&quot;button&quot; value=&quot;计算&quot; onClick=&quot;document.all.t.innerHTML='分区：'+document.form1.G.value+' G&lt;br&gt;设置：'+(calcMB(document.form1.G.value))+' MB'&quot;&gt;&lt;INPUT TYPE=&quot;button&quot; value=&quot;表格&quot; onClick=&quot;makeTable()&quot;&gt;<br />&lt;/FORM&gt;<br />&lt;div id=&quot;t&quot;&gt;&lt;/div&gt;<br />&lt;hr&gt;&lt;/td&gt;<br />&lt;/tr&gt;<br />&lt;/table&gt;<br />&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;<br />&lt;/table&gt;<br /><br /><span style="color: #808000"><strong>flash公式计算器</strong></span><br /><br /><object width="450" height="88" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"><param name="_cx" value="11906" /><param name="_cy" value="2328" /><param name="FlashVars" value="" /><param name="Movie" value="http://img.intozgc.com/pro/2006/10/18/113303,703.swf" /><param name="Src" value="http://img.intozgc.com/pro/2006/10/18/113303,703.swf" /><param name="WMode" value="Window" /><param name="Play" value="0" /><param name="Loop" value="-1" /><param name="Quality" value="High" /><param name="SAlign" value="" /><param name="Menu" value="-1" /><param name="Base" value="" /><param name="AllowScriptAccess" value="" /><param name="Scale" value="ExactFit" /><param name="DeviceFont" value="0" /><param name="EmbedMovie" value="0" /><param name="BGColor" value="" /><param name="SWRemote" value="" /><param name="MovieData" value="" /><param name="SeamlessTabbing" value="1" /><param name="Profile" value="0" /><param name="ProfileAddress" value="" /><param name="ProfilePort" value="0" /><embed type="application/x-shockwave-flash" src="http://img.intozgc.com/pro/2006/10/18/113303,703.swf" width="450" height="88" pluginspage="http://www.macromedia.com/go/getflashplayer" scale="ExactFit" quality="High"></embed></object><br /></span></span></span></span></span></span></p>]]></description>
	<pubDate>Thu, 20 Nov 2008 20:19:17 +0800</pubDate>
	<author>51soump3.com</author>
	<guid>http://blog.51soump3.com/?action=showlog&amp;gid=72</guid>
</item>
<item>
	<title>JavaScript 图片切割效果(带拖放、缩放效果)[转\改]</title>
	<link>http://blog.51soump3.com/?action=showlog&amp;gid=71</link>
	<description><![CDATA[<p><font face="Verdana">原文来自:</font><a href="http://www.cnblogs.com/cloudgamer/archive/2008/07/21/1247267.html"><font face="Verdana">http://www.cnblogs.com/cloudgamer/archive/2008/07/21/1247267.html</font></a><br /><font face="Verdana">作者:cloudgamer<br />自己的网站需要这个功能,看到了cloudgamer的程序,非常值得收藏和使用,所以自己请教了cloudgamer,并进行了小小的修改,感谢cloudgamer的支持,本程序可以获取到选取框的尺寸!<br /><span style="color: #000000"><a id="ematt:58" target="_blank" href="http://blog.51soump3.com/uploadfile/200810/f3ccdd27d2000e3f9255a7e3e2c4880020081029221335.jpg"><img alt="点击查看原图" border="0" src="http://blog.51soump3.com/uploadfile/200810/f3ccdd27d2000e3f9255a7e3e2c4880020081029221335.jpg" /></a><br /><br /><a target="_blank" href="http://download.csdn.net/source/733130">完整实例下载</a></span></font></p>]]></description>
	<pubDate>Wed, 29 Oct 2008 22:08:24 +0800</pubDate>
	<author>51soump3.com</author>
	<guid>http://blog.51soump3.com/?action=showlog&amp;gid=71</guid>
</item>
<item>
	<title>Mysql建表1289错误(InooDB)的解决方法</title>
	<link>http://blog.51soump3.com/?action=showlog&amp;gid=70</link>
	<description><![CDATA[<p><a id="ematt:57" target="_blank" href="http://blog.51soump3.com/uploadfile/200810/b5be2b89fc49b217914d5edf39f1d3c020081018223243.jpg"><img alt="点击查看原图" border="0" src="http://blog.51soump3.com/uploadfile/200810/b5be2b89fc49b217914d5edf39f1d3c020081018223243.jpg" /></a><br />
<span style="color: #0000ff"><strong>MYSQL TABLE TYPE<br />
&nbsp;&nbsp;&nbsp; 首先,先了解MySQL表的类型:MySQL有几种表格类型可供选择，每一种类型都有一些各具优缺点的功能。这些类型分别是ISAM、MyISAM、HEAP、MERGE、BDB和InnoDB。选择类型时要依据许多因素。这些因素包括性能、事务、列锁定和崩溃恢复，当然还不只这些。然而，对该示例应用程序来说，关键的功能是事务和参照完整约束。 </strong></span></p>
<p><span style="color: #0000ff"><strong>&nbsp;&nbsp;&nbsp; 只有InnoDB表格类型能满足条件。至少有两种方法可以指定一个InnoDB表格类型。一是用--default-table-type＝InnoDB来启动MySQL数据库服务器。这样创建的表格是InnoDB类型。（注意：如果没有指定InnoDB 为默认的表类型，那么默认的表类型则为MyISAM）。另一种方法是在创建表格脚本的数据库描述语言（DDL）中详尽指明表格的类型。（</strong></span><a href="http://www.mysql.com/doc/en/Table_types.html"><span style="color: #0000ff"><strong>www.mysql.com/doc/en/Table_types.html</strong></span></a><span style="color: #0000ff"><strong>上提供更多的关于MySQL表格类型的信息）.</strong></span></p>
<p><strong><span style="color: #ff0000">ERROR 1289:&nbsp; The&nbsp; 'InnoDB'&nbsp; feature&nbsp; is&nbsp; disabled;&nbsp; you&nbsp; need&nbsp; MySQL&nbsp; built&nbsp; with&nbsp; 'InnoDB'&nbsp; to&nbsp; have&nbsp; it&nbsp; working</span></strong> </p>
<p><strong><span style="color: #0000ff">用MySQL Administrator导入SQL语句时出错,mysql innodb解决方法: </span></strong></p>
<p><strong><span style="color: #800000">Step 1. Stop MySQL service </span></strong></p>
<p><strong><span style="color: #800000">Step 2. Delete files: </span></strong></p>
<p><strong><span style="color: #800000">C:\Program Files\MySQL\MySQL Server 5.0\data\ib_logfile* <br />
C:\MySQL Datafiles\ibdata* </span></strong></p>
<p><strong><span style="color: #800000">Step 3:打开my.ini 找到 skip-innodb 并在其前加'#'号 </span></strong></p>
<p><strong><span style="color: #800000">Step 4: Restart MySQL service </span></strong></p>]]></description>
	<pubDate>Sat, 18 Oct 2008 22:31:01 +0800</pubDate>
	<author>51soump3.com</author>
	<guid>http://blog.51soump3.com/?action=showlog&amp;gid=70</guid>
</item>
<item>
	<title>EclipsePHP Studio 2008 v1.0 中文版[转]</title>
	<link>http://blog.51soump3.com/?action=showlog&amp;gid=69</link>
	<description><![CDATA[<div>（又名easyeclipse中文版）</div><div>中文修改编译： <a href="http://www.php100.com/">WWW.PHP100.COM</a>&nbsp; 《 PHP100中文站 》<br />联系方式：E-mail:&nbsp; <a href="mailto:master@php100.com">master@php100.com</a>&nbsp; Msn:&nbsp; <a href="mailto:haowubai@hotmail.com">haowubai@hotmail.com</a> <br />&nbsp;</div><div>下载可以到:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a target="_blank" href="http://www.php100.com/php_view_338.html"><span style="color: #ff0000"><b>本地下载</b></span></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #ff0000"><b><a target="_blank" href="http://down.chinaz.com/soft/23822.htm"><span style="color: #ff0000">站长站下载</span></a>&nbsp;&nbsp;&nbsp; <a target="_blank" href="http://www.onlinedown.net/soft/72940.htm"><span style="color: #ff0000">华军软件园下载</span></a>&nbsp;&nbsp;&nbsp; <a target="_blank" href="http://www.skycn.com/soft/48636.html"><span style="color: #ff0000">天空软件下载</span></a></b></span></div><div>&nbsp;</div><div>使用视频教程： <a target="_blank" href="http://www.php100.com/php_view_368.html"><span style="color: #0000ff"><b>下载EclipsePHP Studio 2008视频教程</b></span></a></div><div>&nbsp;</div><div>功能说明：</div><div>&nbsp;&nbsp;&nbsp;&nbsp; EclipsePHP Studio 2008 是一个大型项目开发编译器，给予Eclipse修改而来，并且集成了JDK,免除处了安装配置的麻烦，一次安装即可使用无需配置。此编译器为PHP编译器，辅助PHP代码的开发和调试，集成了代码高亮，函数跟踪，时时纠错等功能。同时还增加了协作开发版本服务器功能： SVN , CVS 。 内嵌浏览器可以在调试简单代码时时时浏览。</div><div>特点：<br />&nbsp;&nbsp; 1、方便PHP面向对象开发，有类集成跟踪功能。<br />&nbsp;&nbsp; 2、代码时时纠错，让语法错误扼杀在摇篮中。<br />&nbsp;&nbsp; 3、内嵌浏览器调试更加方便快捷。<br />&nbsp;&nbsp; 4、集成了常用的版本服务器客户端功能 SVN CVS。<br />&nbsp;&nbsp; 5、丰富的快捷键让开发提高效率。<br />&nbsp;&nbsp; 6、函数，变量，快捷提示，让开发变的简单轻松。<br />&nbsp;&nbsp; 7、强调的调试和结构操作，使得更容易开发大型的项目<br />&nbsp;&nbsp; 8、多项目管理，可以用开发者在多个项目之间切换。<br />&nbsp;&nbsp; 9、很好的扩展功能，可以安装多种插件。<br />&nbsp;</div><p><a id="ematt:44" target="_blank" href="http://blog.51soump3.com/uploadfile/200810/71d5039cf1209140b9105a4696b0b15520081011164350.jpg"><img alt="点击查看原图" border="0" src="http://blog.51soump3.com/uploadfile/200810/71d5039cf1209140b9105a4696b0b15520081011164350.jpg" /></a><a id="ematt:45" target="_blank" href="http://blog.51soump3.com/uploadfile/200810/8a64ea7a1756fdf5993772ceeace6eb720081011164351.jpg"><img alt="点击查看原图" border="0" src="http://blog.51soump3.com/uploadfile/200810/8a64ea7a1756fdf5993772ceeace6eb720081011164351.jpg" /></a><a id="ematt:46" target="_blank" href="http://blog.51soump3.com/uploadfile/200810/0c2bd9aed8eeb3436b7cf20de8ee9c0c20081011164351.jpg"><img alt="点击查看原图" border="0" src="http://blog.51soump3.com/uploadfile/200810/0c2bd9aed8eeb3436b7cf20de8ee9c0c20081011164351.jpg" /></a><a id="ematt:47" target="_blank" href="http://blog.51soump3.com/uploadfile/200810/ce7072535fb5b6c92e34a128b85b54b120081011164351.jpg"><img alt="点击查看原图" border="0" src="http://blog.51soump3.com/uploadfile/200810/ce7072535fb5b6c92e34a128b85b54b120081011164351.jpg" /></a><a id="ematt:48" target="_blank" href="http://blog.51soump3.com/uploadfile/200810/ebe357d4f8d0ba962ca883e047ecda9020081011164351.jpg"><img alt="点击查看原图" border="0" src="http://blog.51soump3.com/uploadfile/200810/ebe357d4f8d0ba962ca883e047ecda9020081011164351.jpg" /></a><a id="ematt:49" target="_blank" href="http://blog.51soump3.com/uploadfile/200810/0a3c95bf5fb4673ecfdb350c07cbebb520081011164351.jpg"><img alt="点击查看原图" border="0" src="http://blog.51soump3.com/uploadfile/200810/0a3c95bf5fb4673ecfdb350c07cbebb520081011164351.jpg" /></a><a id="ematt:50" target="_blank" href="http://blog.51soump3.com/uploadfile/200810/2d0c100cbbebbe710f9b2b4ee913076220081011164351.jpg"><img alt="点击查看原图" border="0" src="http://blog.51soump3.com/uploadfile/200810/2d0c100cbbebbe710f9b2b4ee913076220081011164351.jpg" /></a><a id="ematt:51" target="_blank" href="http://blog.51soump3.com/uploadfile/200810/3f758f9e79a8978bd65eca30c8486e6320081011164351.jpg"><img alt="点击查看原图" border="0" src="http://blog.51soump3.com/uploadfile/200810/3f758f9e79a8978bd65eca30c8486e6320081011164351.jpg" /></a><a id="ematt:52" target="_blank" href="http://blog.51soump3.com/uploadfile/200810/81d31df8a58d41e2ae29679eaaba6f6f20081011164351.jpg"><img alt="点击查看原图" border="0" src="http://blog.51soump3.com/uploadfile/200810/81d31df8a58d41e2ae29679eaaba6f6f20081011164351.jpg" /></a><a id="ematt:53" target="_blank" href="http://blog.51soump3.com/uploadfile/200810/55a252d52e4c2284b957d2014baf631620081011164352.jpg"><img alt="点击查看原图" border="0" src="http://blog.51soump3.com/uploadfile/200810/55a252d52e4c2284b957d2014baf631620081011164352.jpg" /></a><a id="ematt:54" target="_blank" href="http://blog.51soump3.com/uploadfile/200810/bd220e96119f11ccc92096940b1946ae20081011164426.jpg"><img alt="点击查看原图" border="0" src="http://blog.51soump3.com/uploadfile/200810/bd220e96119f11ccc92096940b1946ae20081011164426.jpg" /></a><a id="ematt:55" target="_blank" href="http://blog.51soump3.com/uploadfile/200810/dda699da56c2c60c84a2c1169638cff520081011164426.jpg"><img alt="点击查看原图" border="0" src="http://blog.51soump3.com/uploadfile/200810/dda699da56c2c60c84a2c1169638cff520081011164426.jpg" /></a><a id="ematt:56" target="_blank" href="http://blog.51soump3.com/uploadfile/200810/4eb5772ab5ef3b695c2db5e5fff70f5320081011164426.jpg"><img alt="点击查看原图" border="0" src="http://blog.51soump3.com/uploadfile/200810/4eb5772ab5ef3b695c2db5e5fff70f5320081011164426.jpg" /></a></p>]]></description>
	<pubDate>Sat, 11 Oct 2008 16:49:04 +0800</pubDate>
	<author>51soump3.com</author>
	<guid>http://blog.51soump3.com/?action=showlog&amp;gid=69</guid>
</item>
<item>
	<title>苏州散记</title>
	<link>http://blog.51soump3.com/?action=showlog&amp;gid=68</link>
	<description><![CDATA[<p><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 枫桥夜泊&nbsp;</strong><br />&nbsp;&nbsp;&nbsp;&nbsp;月落乌啼霜满天，江枫渔火对愁眠。 <br />&nbsp;&nbsp;&nbsp;&nbsp;姑苏城外寒山寺，夜半钟声到客船。 <br />&nbsp;&nbsp;&nbsp;&nbsp;这次&quot;华东五市&quot;之旅给我的印象最深的就是苏州和杭州，特别是到了<a id="ematt:43" target="_blank" href="http://blog.51soump3.com/uploadfile/200810/418e841ada655b631ecfca4ceb7c88c020081001155656.jpg"><img height="421" alt="点击查看原图" width="563" border="0" src="http://blog.51soump3.com/uploadfile/200810/418e841ada655b631ecfca4ceb7c88c020081001155656.jpg" /></a><br />枫桥之后，更加体现了张继的那首：&ldquo;月落乌啼霜满天，江枫渔火对秋眠。姑苏城外寒山寺，夜半钟声到客船。&rdquo;正是这首诗感染着一代代读书人，那份情怀、那份执著、那份美好，也吸引着许许多多人踏着张继的脚步来到寒山寺，我到寒山寺，正值午间，六月的阳光依旧热浪扑面，我的心却沉静在寒山寺那种金黄色的色调中，传说中的枫桥其实就是就在眼前，这便是美丽的江桥，那样的安闲美妙，水乡的建筑在桥的对面安然守望着这座美丽的寺庙，走到这里，让人觉得顿时的舒服和平静，这美丽的景色让人深深的记忆在脑海里！</p>]]></description>
	<pubDate>Wed, 01 Oct 2008 15:58:51 +0800</pubDate>
	<author>51soump3.com</author>
	<guid>http://blog.51soump3.com/?action=showlog&amp;gid=68</guid>
</item>
<item>
	<title>Google Sitemap.xml 在线生成程序[Asp&amp;Php版]</title>
	<link>http://blog.51soump3.com/?action=showlog&amp;gid=67</link>
	<description><![CDATA[<p style="text-align: left"><a id="ematt:42" target="_blank" href="http://blog.51soump3.com/uploadfile/200809/0bd57e9cdc7d99d8d468ae4b2518255120080930162652.gif"><img alt="点击查看原图" border="0" src="http://blog.51soump3.com/uploadfile/200809/0bd57e9cdc7d99d8d468ae4b2518255120080930162652.gif" /></a><br />
<br />
&nbsp;&nbsp;&nbsp; Google新推出的Sitemap，是对原来robots.txt的扩展，它使用XML格式来记录整个网站的信息并供Google读取，使搜索引擎能更快更全面的收录网站的内容。<br />
&nbsp;&nbsp;&nbsp; Sitemap的作用就好像为网站提供了整站的RSS，而Google就是这些RSS的订阅者，只要网站有更新就会自动通知Google。这样一来，搜索引擎的收录由被动的Pull变成了主动的Push。<br />
<br />
ASP版代码：<br />
&lt;%<br />
Server.ScriptTimeout=50000<br />
' sitemap_gen.asp<br />
' A simple script to automatically produce sitemaps for a webserver, in the Google Sitemap Protocol (GSP)<br />
' by Francesco Passantino<br />
' <a href="http://www.iteam5.net/francesco/sitemap">www.iteam5.net/francesco/sitemap</a><br />
' v0.2 released 5 june 2005 (Listing a directory tree recursively improvement)<br />
'<br />
' BSD 2.0 license,<br />
' <a href="http://www.opensource.org/licenses/bsd-license.php">http://www.opensource.org/licenses/bsd-license.php</a><br />
' 收集整理:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 重庆森林@im286.com<br />
' 部分修改：　　　 独人向晚QQ19433114</p>
<p><br />
session(&quot;server&quot;)=&quot;<a href="http://blog.51soump3.com">http://blog.51soump3.com</a>&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '你的域名<br />
vDir = &quot;/&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '制作SiteMap的目录,相对目录(相对于根目录而言)</p>
<p><br />
set objfso = CreateObject(&quot;Scripting.FileSystemObject&quot;)<br />
root = Server.MapPath(vDir)</p>
<p>'response.ContentType = &quot;text/xml&quot;<br />
'response.write &quot;&lt;?xml version='1.0' encoding='UTF-8'?&gt;&quot;<br />
'response.write &quot;&lt;urlset xmlns='http://www.google.com/schemas/sitemap/0.84'&gt;&quot;</p>
<p>str = &quot;&lt;?xml version='1.0' encoding='UTF-8'?&gt;&quot; &amp; vbcrlf<br />
str = str &amp; &quot;&lt;urlset xmlns='http://www.google.com/schemas/sitemap/0.84'&gt;&quot; &amp; vbcrlf</p>
<p>Set objFolder = objFSO.GetFolder(root)<br />
'response.write getfilelink(objFolder.Path,objFolder.dateLastModified)<br />
Set colFiles = objFolder.Files<br />
For Each objFile In colFiles<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'response.write getfilelink(objFile.Path,objfile.dateLastModified)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; str = str &amp; getfilelink(objFile.Path,objfile.dateLastModified) &amp; vbcrlf<br />
Next<br />
ShowSubFolders(objFolder)</p>
<p>'response.write &quot;&lt;/urlset&gt;&quot;<br />
str = str &amp; &quot;&lt;/urlset&gt;&quot; &amp; vbcrlf<br />
set fso = nothing</p>
<p>Set objStream = Server.CreateObject(&quot;ADODB.Stream&quot;)<br />
&nbsp;&nbsp;&nbsp; With objStream<br />
&nbsp;&nbsp;&nbsp; '.Type = adTypeText<br />
&nbsp;&nbsp;&nbsp; '.Mode = adModeReadWrite<br />
&nbsp;&nbsp;&nbsp; .Open<br />
&nbsp;&nbsp;&nbsp; .Charset = &quot;utf-8&quot;<br />
&nbsp;&nbsp;&nbsp; .Position = objStream.Size<br />
&nbsp;&nbsp;&nbsp; .WriteText=str<br />
&nbsp;&nbsp;&nbsp; .SaveToFile server.mappath(&quot;/sitemap.xml&quot;),2 '生成的XML文件名<br />
&nbsp;&nbsp;&nbsp; .Close<br />
&nbsp;&nbsp;&nbsp; End With</p>
<p>&nbsp; Set objStream = Nothing<br />
&nbsp; If Not Err Then<br />
&nbsp;&nbsp;&nbsp; Response.Write(&quot;&lt;script&gt;alert('成功生成站点地图!');history.back();&lt;/script&gt;&quot;)<br />
&nbsp;&nbsp;&nbsp; Response.End<br />
&nbsp; End If</p>
<p>Sub ShowSubFolders(objFolder)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set colFolders = objFolder.SubFolders<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For Each objSubFolder In colFolders<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if folderpermission(objSubFolder.Path) then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'response.write getfilelink(objSubFolder.Path,objSubFolder.dateLastModified)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; str = str &amp; getfilelink(objSubFolder.Path,objSubFolder.dateLastModified) &amp; vbcrlf<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set colFiles = objSubFolder.Files<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For Each objFile In colFiles<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'response.write getfilelink(objFile.Path,objFile.dateLastModified)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; str = str &amp; getfilelink(objFile.Path,objFile.dateLastModified) &amp; vbcrlf<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Next<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ShowSubFolders(objSubFolder)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end if<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Next<br />
End Sub</p>
<p><br />
Function getfilelink(file,datafile)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; file=replace(file,root,&quot;&quot;,1,-1,1)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; file=replace(file,&quot;\&quot;,&quot;/&quot;)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If FileExtensionIsBad(file) then Exit Function<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if month(datafile)&lt;10 then filedatem=&quot;0&quot;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if day(datafile)&lt;10 then filedated=&quot;0&quot;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; filedate=year(datafile)&amp;&quot;-&quot;&amp;filedatem&amp;month(datafile)&amp;&quot;-&quot;&amp;filedated&amp;day(datafile)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; getfilelink = &quot;&lt;url&gt;&lt;loc&gt;&quot;&amp;server.htmlencode(session(&quot;server&quot;)&amp;file)&amp;&quot;&lt;/loc&gt;&lt;lastmod&gt;&quot;&amp;filedate&amp;&quot;&lt;/lastmod&gt;&lt;changefreq&gt;daily&lt;/changefreq&gt;<br />
&lt;priority&gt;1.0&lt;/priority&gt;&lt;/url&gt;&quot;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Response.Flush<br />
End Function</p>
<p><br />
Function Folderpermission(pathName)</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '需要过滤的目录(不列在SiteMap里面)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PathExclusion=Array(&quot;\blog&quot;,&quot;\temp&quot;,&quot;\_vti_cnf&quot;,&quot;_vti_pvt&quot;,&quot;_vti_log&quot;,&quot;cgi-bin&quot;,&quot;\admin&quot;,&quot;\edu&quot;)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Folderpermission =True<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for each PathExcluded in PathExclusion<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if instr(ucase(pathName),ucase(PathExcluded))&gt;0 then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Folderpermission = False<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit for<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end if<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; next<br />
End Function</p>
<p><br />
Function FileExtensionIsBad(sFileName)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim sFileExtension, bFileExtensionIsValid, sFileExt<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'modify for your file extension (<a href="http://www.googleguide.com/file_type.html">http://www.googleguide.com/file_type.html</a>)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Extensions = Array(&quot;asp&quot;,&quot;png&quot;,&quot;jpeg&quot;,&quot;zip&quot;,&quot;pdf&quot;,&quot;ps&quot;,&quot;html&quot;,&quot;htm&quot;,&quot;php&quot;,&quot;wk1&quot;,&quot;wk2&quot;,&quot;wk3&quot;,&quot;wk4&quot;,&quot;wk5&quot;,&quot;wki&quot;,&quot;wks&quot;<br />
,&quot;wku&quot;,&quot;lwp&quot;,&quot;mw&quot;,&quot;xls&quot;,&quot;ppt&quot;,&quot;doc&quot;,&quot;wks&quot;,&quot;wps&quot;,&quot;wdb&quot;,&quot;wri&quot;,&quot;rtf&quot;,&quot;ans&quot;,&quot;txt&quot;)<br />
'设置列表的文件名,扩展名不在其中的话SiteMap则不会收录该扩展名的文件</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if len(trim(sFileName)) = 0 then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FileExtensionIsBad = true<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Exit Function<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end if</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sFileExtension = right(sFileName, len(sFileName) - instrrev(sFileName, &quot;.&quot;))<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bFileExtensionIsValid = false&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'assume extension is bad<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for each sFileExt in extensions<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ucase(sFileExt) = ucase(sFileExtension) then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bFileExtensionIsValid = True<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit for<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end if<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; next<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FileExtensionIsBad = not bFileExtensionIsValid<br />
End Function<br />
%&gt;</p>
<p>&nbsp;</p>
<p>PHP版代码：<br />
&lt;?php<br />
header('Content-type: application/xml; charset=&quot;GB2312&quot;',true);<br />
?&gt;<br />
&lt;!--<br />
@author Tobias Kluge, enarion.net<br />
@version 0.2, 2005-06-05 17:40 PT<br />
@status working<br />
@update Aditya Naik, <a href="mailto:so1o@so1o.net">so1o@so1o.net</a><br />
@Licence: LGPL</p>
<p>editor:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="mailto:MildSeven@im286.com">MildSeven@im286.com</a></p>
<p>--&gt;<br />
&lt;?php<br />
$website = &quot;<a href="http://blog.51soump3.com">http://blog.51soump3.com</a>&quot;; /* change this */<br />
$page_root = &quot;/usr/local/psa/home/vhosts/subdomains/my/httpdocs&quot;;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* change this */</p>
<p>/* maybe change this: */<br />
$changefreq = &quot;weekly&quot;; //&quot;always&quot;, &quot;hourly&quot;, &quot;daily&quot;, &quot;weekly&quot;, &quot;monthly&quot;, &quot;yearly&quot; and &quot;never&quot;.<br />
$priority = 0.8;<br />
/* this sets the last modification date of all pages to the current date */<br />
$last_modification = date(&quot;Y-m-d\TH:i:s&quot;) . substr(date(&quot;O&quot;),0,3) . &quot;:&quot; . substr(date(&quot;O&quot;),3);</p>
<p>/* list of allowed directories */<br />
$allow_dir[] = &quot;web&quot;;</p>
<p>/* list of disallowed directories */<br />
$disallow_dir[] = &quot;admin&quot;;<br />
$disallow_dir[] = &quot;_notes&quot;;</p>
<p>/* list of disallowed file types */<br />
$disallow_file[] = &quot;.inc&quot;;<br />
$disallow_file[] = &quot;.old&quot;;<br />
$disallow_file[] = &quot;.save&quot;;<br />
$disallow_file[] = &quot;.txt&quot;;<br />
$disallow_file[] = &quot;.js&quot;;<br />
$disallow_file[] = &quot;~&quot;;<br />
$disallow_file[] = &quot;.LCK&quot;;<br />
$disallow_file[] = &quot;.zip&quot;;<br />
$disallow_file[] = &quot;.ZIP&quot;;<br />
$disallow_file[] = &quot;.CSV&quot;;<br />
$disallow_file[] = &quot;.csv&quot;;<br />
$disallow_file[] = &quot;.css&quot;;<br />
$disallow_file[] = &quot;.class&quot;;<br />
$disallow_file[] = &quot;.jar&quot;;<br />
$disallow_file[] = &quot;.mno&quot;;<br />
$disallow_file[] = &quot;.bak&quot;;<br />
$disallow_file[] = &quot;.lck&quot;;<br />
$disallow_file[] = &quot;.BAK&quot;;</p>
<p>/* simple compare function: equals */<br />
function ar_contains($key, $array) {<br />
&nbsp; foreach ($array as $val) {<br />
&nbsp;&nbsp;&nbsp; if ($key == $val) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return true;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp; }<br />
&nbsp; return false;<br />
}</p>
<p>/* better compare function: contains */<br />
function fl_contains($key, $array) {<br />
&nbsp; foreach ($array as $val) {<br />
&nbsp;&nbsp;&nbsp; $pos = strpos($key, $val);<br />
&nbsp;&nbsp;&nbsp; if ($pos === FALSE) continue;<br />
&nbsp;&nbsp;&nbsp; return true;<br />
&nbsp; }</p>
<p>&nbsp; return false;<br />
}</p>
<p>/* this function changes a substring($old_offset) of each array element to $offset */<br />
function changeOffset($array, $old_offset, $offset) {<br />
&nbsp; $res = array();<br />
&nbsp; foreach ($array as $val) {<br />
&nbsp;&nbsp;&nbsp; $res[] = str_replace($old_offset, $offset, $val);<br />
&nbsp; }<br />
&nbsp; return $res;<br />
}</p>
<p>/* this walks recursivly through all directories starting at page_root and<br />
&nbsp;&nbsp; adds all files that fits the filter criterias */<br />
// taken from Lasse Dalegaard, <a href="http://php.net/opendir">http://php.net/opendir</a><br />
function getFiles($directory, $directory_orig = &quot;&quot;, $directory_offset=&quot;&quot;) {<br />
&nbsp;&nbsp; global $disallow_dir, $disallow_file, $allow_dir;</p>
<p>&nbsp;&nbsp; if ($directory_orig == &quot;&quot;) $directory_orig = $directory;</p>
<p>&nbsp;&nbsp; if($dir = opendir($directory)) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Create an array for all files found<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $tmp = Array();</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Add the files<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while($file = readdir($dir)) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Make sure the file exists<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if($file != &quot;.&quot; &amp;&amp; $file != &quot;..&quot; &amp;&amp; $file[0] != '.' ) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // If it's a directiry, list all files within it<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //echo &quot;point1&lt;br&gt;&quot;;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(is_dir($directory . &quot;/&quot; . $file)) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //echo &quot;point2&lt;br&gt;&quot;;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $disallowed_abs = fl_contains($directory.&quot;/&quot;.$file, $disallow_dir); // handle directories with pathes<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $disallowed = ar_contains($file, $disallow_dir); // handle directories only without pathes<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $allowed_abs = fl_contains($directory.&quot;/&quot;.$file, $allow_dir);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $allowed = ar_contains($file, $allow_dir);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($disallowed || $disallowed_abs) continue;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($allowed_abs || $allowed){<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $tmp2 = changeOffset(getFiles($directory . &quot;/&quot; . $file, $directory_orig, $directory_offset), $directory_orig, $directory_offset);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(is_array($tmp2)) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $tmp = array_merge($tmp, $tmp2);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else {&nbsp; // files<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (fl_contains($file, $disallow_file)) continue;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; array_push($tmp, str_replace($directory_orig, $directory_offset, $directory.&quot;/&quot;.$file));<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Finish off the function<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; closedir($dir);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return $tmp;<br />
&nbsp;&nbsp; }<br />
}</p>
<p>$a = getFiles($page_root);</p>
<p><br />
echo '&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;';<br />
?&gt;</p>
<p>&lt;urlset xmlns=&quot;<a href="http://www.google.com/schemas/sitemap/0.84">http://www.google.com/schemas/sitemap/0.84</a>&quot;&gt;<br />
&lt;?<br />
foreach ($a as $file) {<br />
?&gt;<br />
&nbsp;&nbsp; &lt;url&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;loc&gt;&lt;? echo utf8_encode($website.$file); ?&gt;&lt;/loc&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;lastmod&gt;&lt;? echo utf8_encode(date(&quot;Y-m-d\TH:i:s&quot;, filectime($page_root.$file)). substr(date(&quot;O&quot;),0,3) . &quot;:&quot; . substr(date(&quot;O&quot;),3));?&gt;&lt;/lastmod&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;changefreq&gt;&lt;? echo utf8_encode($changefreq); ?&gt;&lt;/changefreq&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;priority&gt;&lt;? echo utf8_encode($priority); ?&gt;&lt;/priority&gt;<br />
&nbsp;&nbsp; &lt;/url&gt;<br />
&lt;?<br />
}<br />
?&gt;<br />
&lt;/urlset&gt;</p>
<p><br />
参数说明:<br />
$website--你的域名<br />
$page_root--你的站点的绝对路径<br />
$changefreq--更新时间单位 &quot;always&quot;(始终), &quot;hourly&quot;(小时), &quot;daily&quot;(天), &quot;weekly&quot;(星期), &quot;monthly&quot;(月), &quot;yearly&quot; &quot;never&quot;(从不)<br />
$priority--更新频率<br />
$allow_dir--允许列表的目录<br />
$disallow_dir--禁止列表的目录<br />
$disallow_file--禁止列表的文件类型</p>
<p>制作过程说明：<br />
　　将以上代码复制到本地存为sitemap.asp或sitemap.php，上传到你的服务器网站的根目录下，运行一下就可以在你指定的目录中（建议最好是指定为根目录）自动生成一个sitemap.xml文件了。最后进入google提交页面：<a href="https://www.google.com/webmasters/sitemaps/login">https://www.google.com/webmasters/sitemaps/login</a>，有gmail的可以用gmail直接登录。登录后把生成的xml文件地址按步骤提交就可以了。注：你的网站如果增加了新的页面，可以在增加完后再运行一下sitemap.asp或sitemap.php，并再重新提交一下sitemap.xml文件，这样就可以保证sitemap.xml文件的不断更新了！<br />
&nbsp;</p>]]></description>
	<pubDate>Tue, 30 Sep 2008 16:09:53 +0800</pubDate>
	<author>51soump3.com</author>
	<guid>http://blog.51soump3.com/?action=showlog&amp;gid=67</guid>
</item>
<item>
	<title>AspJpeg组件:介绍、注册、高级使用方法</title>
	<link>http://blog.51soump3.com/?action=showlog&amp;gid=66</link>
	<description><![CDATA[<div class="WritingTitle" id="WritingTitle"><font face="Fixedsys"><a id="ematt:40" target="_blank" href="http://blog.51soump3.com/uploadfile/200809/35d6be904bc88bd1d01ac41fd45a588920080916003621.jpg"><img alt="点击查看原图" border="0" src="http://blog.51soump3.com/uploadfile/200809/35d6be904bc88bd1d01ac41fd45a588920080916003621.jpg" /></a><br />
1、什么是AspJpeg？<br />
　　AspJpeg是一款功能强大的基于Microsoft&nbsp;IIS环境的图片处理组件，网络上对其进行详细和深入介绍的中文文章并不多，即使有一般也只是牵涉到图片缩略图和图片水印，这与其为英文版本有着密切的关系。<br />
　　AspJpeg可以使用很少的代码在您的ASP/ASP.Net应用程序上动态的创建高质量的缩略图象，支持的图象格式有：JPEG,&nbsp;GIF,&nbsp;BMP,&nbsp;TIFF,&nbsp;PNG<br />
<br />
AspJpeg主要可以做到：<br />
生成缩略图片<br />
生成水印图片<br />
图片合并<br />
图片切割<br />
数据库支持<br />
安全码技术<br />
<br />
2、AspJpeg功能摘要<br />
支持JPEG,&nbsp;GIF,&nbsp;BMP,&nbsp;TIFF&nbsp;和&nbsp;PNG&nbsp;格式图片.&nbsp;输出格式始终为&nbsp;JPEG<br />
源图片可以来源于磁盘、内存、或者记录集（数据库）<br />
缩略图片可以保存到磁盘、内存、或者HTTP流<br />
支持三种更改大小方式:&nbsp;nearest-neighbor,&nbsp;bilinear,&nbsp;and&nbsp;bicubic.<br />
可以在图片之上添加图片或者文字.<br />
支持画中画<br />
支持复制，反转，旋转，锐化，灰度调节.<br />
可以调节压缩比率，以得到最佳输出效果和大小.<br />
从Jpeg图片中抽取EXIF&nbsp;和&nbsp;IPTC数据.<br />
CMYK-RGB转换<br />
Read/write&nbsp;access&nbsp;to&nbsp;individual&nbsp;pixels&nbsp;of&nbsp;an&nbsp;image.&nbsp;（从图象中对任意象素进行读/写存取。）<br />
<br />
3、AspJpeg系统需求<br />
Windows&nbsp;95/98/NT/2000/XP/2003,&nbsp;and<br />
IIS&nbsp;4.0+&nbsp;and&nbsp;ASP/ASP.NET,&nbsp;or<br />
Visual&nbsp;Basic&nbsp;5.0+,&nbsp;or<br />
Visual&nbsp;C++&nbsp;5.0+,&nbsp;or<br />
any&nbsp;development&nbsp;environment&nbsp;supporting&nbsp;COM.<br />
<br />
4、AspJpeg安装<br />
全新安装：<br />
在AspJpeg安装过程中输入序列号即可，如果安装位置磁盘格式为NTFS，则可能出现访问权限问题，需手工设置安装目录对Everyone有访问权限。<br />
</font><font face="Fixedsys"><font color="#ff0000">AspJpeg&nbsp;v1.6.0.0<br />
安装sn:48958-77556-02411<br />
AspJpeg&nbsp;v1.5.0<br />
安装sn:71316-48529-38722</font><br />
<br />
<br />
更新安装：<br />
如果之前有装过其它版本的AspJpeg组件，则需要先卸载原来的组件，再进行新版本的安装。<br />
先停止IIS<br />
Net&nbsp;Stop&nbsp;iisadmin&nbsp;/y<br />
卸载旧版组件<br />
regsvr32&nbsp;/u&nbsp;Path/aspjpeg.dl（Path为安装路径）<br />
重启IIS<br />
Net&nbsp;Start&nbsp;w3svc<br />
<br />
然后再进行全新安装或复制AspJpeg.dll文件到安装目录进行手工安装：<br />
regsvr32&nbsp;Path/aspjpeg.dll（Path为安装路径）<br />
<br />
如果在正常安装过程中没有输入序列号或手工安装则必须在注册表中加入以下项，为方便起见您可以直接将以下代码保存为.reg文档并导入注册表：<br />
<br />
Windows&nbsp;Registry&nbsp;Editor&nbsp;Version&nbsp;5.00<br />
<br />
[HKEY_LOCAL_MACHINE\SOFTWARE\Persits&nbsp;Software\AspJpeg\RegKey]<br />
@=&quot;48958-77556-02411&quot;<br />
<br />
<br />
5、如何创建一个AspJpeg实例？<br />
Set&nbsp;Jpeg&nbsp;=&nbsp;Server.CreateObject(&quot;Persits.Jpeg&quot;)<br />
<br />
6、如何查看到期时间（是否注册成功）？<br />
Set&nbsp;Jpeg&nbsp;=&nbsp;Server.CreateObject(&quot;Persits.Jpeg&quot;)<br />
Response.Write&nbsp;Jpeg.Expires<br />
注册成功则到期时间为：9999-9-9<br />
否则为：安装日期加1个月期限<br />
<br />
7、如何用AspJpeg组件生成图片缩略图？<br />
<br />
</font><font face="Fixedsys"><font color="#8000ff">&lt;%<br />
</font><font color="#0000ff">Set&nbsp;</font>Jpeg&nbsp;<font color="#000080">=&nbsp;</font>Server<font color="#000080">.</font>CreateObject<font color="#000080">(</font><font color="#800000">&quot;Persits.Jpeg&quot;</font><font color="#000080">)&nbsp;</font></font><font face="Fixedsys"><font color="#008000">'创建实例<br />
</font>Path&nbsp;<font color="#000080">=&nbsp;</font>Server<font color="#000080">.</font>MapPath<font color="#000080">(</font><font color="#800000">&quot;../images/apple.jpg&quot;</font><font color="#000080">)&nbsp;</font></font><font face="Fixedsys"><font color="#008000">'处理图片路径<br />
</font>Jpeg<font color="#000080">.</font>Open&nbsp;Path&nbsp;</font><font face="Fixedsys"><font color="#008000">'打开图片<br />
'调整宽度和高度为原来的50%<br />
</font>Jpeg<font color="#000080">.</font>Width&nbsp;<font color="#000080">=&nbsp;</font>Jpeg<font color="#000080">.</font>OriginalWidth&nbsp;<font color="#000080">/&nbsp;</font></font><font face="Fixedsys"><font color="#800080">2<br />
</font>Jpeg<font color="#000080">.</font>Height&nbsp;<font color="#000080">=&nbsp;</font>Jpeg<font color="#000080">.</font>OriginalHeight&nbsp;<font color="#000080">/&nbsp;</font></font><font face="Fixedsys"><font color="#800080">2<br />
</font>Jpeg<font color="#000080">.</font>Save&nbsp;Server<font color="#000080">.</font>MapPath<font color="#000080">(</font><font color="#800000">&quot;apple_small.jpg&quot;</font><font color="#000080">)&nbsp;</font></font><font face="Fixedsys"><font color="#008000">'保存图片到磁盘<br />
</font>Jpeg<font color="#000080">.</font>Close<br />
<font color="#0000ff">Set&nbsp;</font>Jpeg&nbsp;<font color="#000080">=&nbsp;</font></font><font face="Fixedsys" color="#0000ff">Nothing<br />
</font><font face="Fixedsys"><font color="#8000ff">%&gt;<br />
<br />
</font>8、如何用AspJpeg组件生成图片水印？<br />
<br />
</font><font face="Fixedsys"><font color="#8000ff">&lt;%<br />
</font><font color="#0000ff">Set&nbsp;</font>Jpeg&nbsp;<font color="#000080">=&nbsp;</font>Server<font color="#000080">.</font>CreateObject<font color="#000080">(</font><font color="#800000">&quot;Persits.Jpeg&quot;</font></font><font face="Fixedsys"><font color="#000080">)<br />
</font>Jpeg<font color="#000080">.</font>Open&nbsp;Server<font color="#000080">.</font>MapPath<font color="#000080">(</font><font color="#800000">&quot;images/dodge_viper.jpg&quot;</font></font><font face="Fixedsys" color="#000080">)<br />
</font><font face="Fixedsys"><font color="#008000">'开始写文字<br />
</font>Jpeg<font color="#000080">.</font>Canvas<font color="#000080">.</font>Font<font color="#000080">.</font>Color&nbsp;<font color="#000080">=&nbsp;&amp;</font><font color="#800080">000000&nbsp;</font></font><font face="Fixedsys"><font color="#008000">'&nbsp;red&nbsp;颜色<br />
</font>Jpeg<font color="#000080">.</font>Canvas<font color="#000080">.</font>Font<font color="#000080">.</font>Family&nbsp;<font color="#000080">=&nbsp;</font><font color="#800000">&quot;Courier&nbsp;New&quot;&nbsp;</font></font><font face="Fixedsys"><font color="#008000">'字体<br />
</font>Jpeg<font color="#000080">.</font>Canvas<font color="#000080">.</font>Font<font color="#000080">.</font>Bold&nbsp;<font color="#000080">=&nbsp;</font><font color="#0000ff">True&nbsp;</font></font><font face="Fixedsys"><font color="#008000">'是否加粗<br />
</font>Jpeg<font color="#000080">.</font>Canvas<font color="#000080">.</font>Print&nbsp;<font color="#800080">10</font><font color="#000080">,&nbsp;</font><font color="#800080">10</font><font color="#000080">,&nbsp;</font></font><font face="Fixedsys" color="#800000">&quot;Copyright&nbsp;(c)&nbsp;http://hi.baidu.com/yongfa365.&quot;<br />
</font><font face="Fixedsys"><font color="#008000">'打印坐标x&nbsp;打印坐标y&nbsp;需要打印的字符<br />
'以下是对图片进行边框处理<br />
</font>Jpeg<font color="#000080">.</font>Canvas<font color="#000080">.</font>Pen<font color="#000080">.</font>Color&nbsp;<font color="#000080">=&nbsp;&amp;</font>H000000&nbsp;</font><font face="Fixedsys"><font color="#008000">'black&nbsp;颜色<br />
</font>Jpeg<font color="#000080">.</font>Canvas<font color="#000080">.</font>Pen<font color="#000080">.</font>Width&nbsp;<font color="#000080">=&nbsp;</font><font color="#800080">2&nbsp;</font></font><font face="Fixedsys"><font color="#008000">'画笔宽度<br />
</font>Jpeg<font color="#000080">.</font>Canvas<font color="#000080">.</font>Brush<font color="#000080">.</font>Solid&nbsp;<font color="#000080">=&nbsp;</font><font color="#0000ff">False&nbsp;</font></font><font face="Fixedsys"><font color="#008000">'是否加粗处理<br />
</font>Jpeg<font color="#000080">.</font>Canvas<font color="#000080">.</font>Bar&nbsp;<font color="#800080">1</font><font color="#000080">,&nbsp;</font><font color="#800080">1</font><font color="#000080">,&nbsp;</font>Jpeg<font color="#000080">.</font>Width<font color="#000080">,&nbsp;</font>Jpeg<font color="#000080">.</font>Height<br />
</font><font face="Fixedsys"><font color="#008000">'起始X坐标&nbsp;起始Y坐标&nbsp;输入长度&nbsp;输入高度<br />
</font>Jpeg<font color="#000080">.</font>Save&nbsp;Server<font color="#000080">.</font>MapPath<font color="#000080">(</font><font color="#800000">&quot;images/dodge_viper_framed.jpg&quot;</font><font color="#000080">)&nbsp;</font></font><font face="Fixedsys" color="#008000">'保存<br />
</font><font face="Fixedsys"><font color="#8000ff">%&gt;<br />
<br />
</font>9、如何用AspJpeg组件进行图片合并？<br />
AspJpeg&nbsp;1.3+&nbsp;enables&nbsp;you&nbsp;to&nbsp;place&nbsp;images&nbsp;on&nbsp;top&nbsp;of&nbsp;each&nbsp;other&nbsp;</font></div>
<div class="WritingTitle"><font face="Fixedsys">via&nbsp;the&nbsp;method&nbsp;DrawImage.&nbsp;To&nbsp;use&nbsp;this&nbsp;method,&nbsp;you&nbsp;must&nbsp;create&nbsp;</font></div>
<div class="WritingTitle"><font face="Fixedsys">two&nbsp;instances&nbsp;of&nbsp;the&nbsp;AspJpeg&nbsp;objects&nbsp;and&nbsp;populate&nbsp;both&nbsp;of&nbsp;them&nbsp;</font></div>
<div class="WritingTitle"><font face="Fixedsys">with&nbsp;images&nbsp;via&nbsp;calls&nbsp;to&nbsp;Open&nbsp;(or&nbsp;OpenBinary).&nbsp;When&nbsp;calling&nbsp;</font></div>
<div class="WritingTitle"><font face="Fixedsys">Canvas.DrawImage,&nbsp;the&nbsp;2nd&nbsp;instance&nbsp;of&nbsp;AspJpeg&nbsp;is&nbsp;passed&nbsp;as&nbsp;an&nbsp;</font></div>
<div class="WritingTitle"><font face="Fixedsys">argument&nbsp;to&nbsp;this&nbsp;method,&nbsp;along&nbsp;with&nbsp;the&nbsp;X&nbsp;and&nbsp;Y&nbsp;offsets&nbsp;(in&nbsp;pixels):<br />
使用该方法，您必需创建两个AspJpeg实例对象<br />
<br />
</font><font face="Fixedsys"><font color="#8000ff">&lt;%<br />
</font><font color="#0000ff">Set&nbsp;</font>Jpeg1&nbsp;<font color="#000080">=&nbsp;</font>Server<font color="#000080">.</font>CreateObject<font color="#000080">(</font><font color="#800000">&quot;Persits.Jpeg&quot;</font></font><font face="Fixedsys"><font color="#000080">)<br />
</font><font color="#0000ff">Set&nbsp;</font>Jpeg2&nbsp;<font color="#000080">=&nbsp;</font>Server<font color="#000080">.</font>CreateObject<font color="#000080">(</font><font color="#800000">&quot;Persits.Jpeg&quot;</font></font><font face="Fixedsys"><font color="#000080">)<br />
</font>Jpeg1<font color="#000080">.</font>Open&nbsp;Server<font color="#000080">.</font>MapPath<font color="#000080">(</font><font color="#800000">&quot;t.jpg&quot;</font></font><font face="Fixedsys"><font color="#000080">)<br />
</font>Jpeg2<font color="#000080">.</font>Open&nbsp;Server<font color="#000080">.</font>MapPath<font color="#000080">(</font><font color="#800000">&quot;t1.jpg&quot;</font></font><font face="Fixedsys"><font color="#000080">)<br />
</font>Jpeg1<font color="#000080">.</font>Canvas<font color="#000080">.</font>DrawImage&nbsp;<font color="#800080">10</font><font color="#000080">,&nbsp;</font><font color="#800080">10</font><font color="#000080">,&nbsp;</font>Jpeg2&nbsp;</font><font face="Fixedsys"><font color="#008000">'&nbsp;optional&nbsp;arguments&nbsp;omitted<br />
</font>jpeg1<font color="#000080">.</font>save&nbsp;Server<font color="#000080">.</font>mappath<font color="#000080">(</font><font color="#800000">&quot;tt.jpg&quot;</font></font><font face="Fixedsys" color="#000080">)<br />
</font><font face="Fixedsys"><font color="#8000ff">%&gt;<br />
<br />
</font>10、如何用AspJpeg组件进行图片切割？<br />
AspJpeg&nbsp;1.1+&nbsp;is&nbsp;also&nbsp;capable&nbsp;of&nbsp;cutting&nbsp;off&nbsp;edges&nbsp;from,&nbsp;or&nbsp;cropping,&nbsp;</font></div>
<div class="WritingTitle"><font face="Fixedsys">the&nbsp;resultant&nbsp;thumbnails&nbsp;via&nbsp;the&nbsp;method&nbsp;Crop(x0,&nbsp;y0,&nbsp;x1,&nbsp;y1).&nbsp;The&nbsp;size&nbsp;of&nbsp;the&nbsp;cropped&nbsp;image&nbsp;is&nbsp;specified&nbsp;by&nbsp;the&nbsp;</font></div>
<div class="WritingTitle"><font face="Fixedsys">coordinates&nbsp;of&nbsp;the&nbsp;upper-left&nbsp;and&nbsp;lower-right&nbsp;corners&nbsp;within&nbsp;the&nbsp;resultant&nbsp;thumbnail,&nbsp;not&nbsp;the&nbsp;original&nbsp;large&nbsp;image.<br />
<br />
</font><font face="Fixedsys"><font color="#8000ff">&lt;%<br />
</font><font color="#0000ff">Set&nbsp;</font>Jpeg&nbsp;<font color="#000080">=&nbsp;</font>Server<font color="#000080">.</font>CreateObject<font color="#000080">(</font><font color="#800000">&quot;Persits.Jpeg&quot;</font></font><font face="Fixedsys"><font color="#000080">)<br />
</font>Jpeg<font color="#000080">.</font>Open&nbsp;Server<font color="#000080">.</font>MapPath<font color="#000080">(</font><font color="#800000">&quot;t.jpg&quot;</font></font><font face="Fixedsys"><font color="#000080">)<br />
</font>jpeg<font color="#000080">.</font>Crop&nbsp;<font color="#800080">20</font><font color="#000080">,&nbsp;</font><font color="#800080">30</font><font color="#000080">,&nbsp;</font>jpeg<font color="#000080">.</font>Width&nbsp;<font color="#000080">-&nbsp;</font><font color="#800080">20</font><font color="#000080">,&nbsp;</font>jpeg<font color="#000080">.</font>Height&nbsp;<font color="#000080">-&nbsp;</font></font><font face="Fixedsys"><font color="#800080">10<br />
</font>jpeg<font color="#000080">.</font>save&nbsp;Server<font color="#000080">.</font>mappath<font color="#000080">(</font><font color="#800000">&quot;tt.jpg&quot;</font></font><font face="Fixedsys"><font color="#000080">)<br />
</font>Response<font color="#000080">.</font>Write<font color="#000080">(</font><font color="#800000">&quot;&quot;</font></font><font face="Fixedsys" color="#000080">)<br />
</font><font face="Fixedsys"><font color="#8000ff">%&gt;<br />
<br />
<br />
</font>11、如何用AspJpeg组件创建安全码？<br />
创建安全码原理上和创建水印差不多。<br />
<br />
</font><font face="Fixedsys"><font color="#8000ff">&lt;%<br />
</font><font color="#0000ff">Function&nbsp;</font>make_randomize<font color="#000080">(</font>max_len<font color="#000080">,&nbsp;</font>w_n<font color="#000080">)&nbsp;</font></font><font face="Fixedsys" color="#008000">'max_len&nbsp;生成长度，w_n：0&nbsp;</font></div>
<div class="WritingTitle"><font face="Fixedsys" color="#008000">可能包含字母，1：只为数字<br />
&nbsp;&nbsp;&nbsp;&nbsp;</font><font face="Fixedsys"><font color="#0000ff">Randomize<br />
&nbsp;&nbsp;&nbsp;&nbsp;For&nbsp;</font>intcounter&nbsp;<font color="#000080">=&nbsp;</font><font color="#800080">1&nbsp;</font><font color="#0000ff">To&nbsp;</font>max_len<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;whatnext&nbsp;<font color="#000080">=&nbsp;</font>Int<font color="#000080">((</font><font color="#800080">1&nbsp;</font><font color="#000080">-</font><font color="#800080">0&nbsp;</font><font color="#000080">+&nbsp;</font><font color="#800080">1</font><font color="#000080">)&nbsp;*&nbsp;</font>Rnd&nbsp;<font color="#000080">+&nbsp;</font>w_n</font><font face="Fixedsys"><font color="#000080">)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000ff">If&nbsp;</font>whatnext&nbsp;<font color="#000080">=&nbsp;</font><font color="#800080">0&nbsp;</font></font><font face="Fixedsys"><font color="#0000ff">Then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font>upper&nbsp;<font color="#000080">=&nbsp;</font></font><font face="Fixedsys"><font color="#800080">122<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font>lower&nbsp;<font color="#000080">=&nbsp;</font></font><font face="Fixedsys" color="#800080">97<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font face="Fixedsys"><font color="#0000ff">Else<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font>upper&nbsp;<font color="#000080">=&nbsp;</font></font><font face="Fixedsys"><font color="#800080">57<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font>lower&nbsp;<font color="#000080">=&nbsp;</font></font><font face="Fixedsys" color="#800080">48<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font face="Fixedsys"><font color="#0000ff">End&nbsp;If<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font>strnewpass&nbsp;<font color="#000080">=&nbsp;</font>strnewpass&nbsp;<font color="#000080">&amp;&nbsp;</font>Chr<font color="#000080">(</font>Int<font color="#000080">((</font>upper&nbsp;<font color="#000080">-&nbsp;</font>lower&nbsp;<font color="#000080">+&nbsp;</font><font color="#800080">1</font><font color="#000080">)&nbsp;*&nbsp;</font>Rnd<font color="#000080">)&nbsp;+&nbsp;</font>lower</font><font face="Fixedsys" color="#000080">)<br />
&nbsp;&nbsp;&nbsp;&nbsp;</font><font face="Fixedsys"><font color="#0000ff">Next<br />
&nbsp;&nbsp;&nbsp;&nbsp;</font>make_randomize&nbsp;<font color="#000080">=&nbsp;</font>strnewpass<br />
</font><font face="Fixedsys" color="#0000ff">End&nbsp;Function<br />
<br />
</font><font face="Fixedsys"><font color="#008000">'生成安全码的图片。<br />
</font>random_num&nbsp;<font color="#000080">=&nbsp;</font>make_randomize<font color="#000080">(</font><font color="#800080">4</font><font color="#000080">,&nbsp;</font><font color="#800080">1</font><font color="#000080">)&nbsp;</font></font><font face="Fixedsys"><font color="#008000">''生成4位数字的安全码<br />
</font>session<font color="#000080">(</font><font color="#800000">&quot;random_num&quot;</font><font color="#000080">)&nbsp;=&nbsp;</font>random_num&nbsp;</font><font face="Fixedsys"><font color="#008000">'为么调用session，没有</font></font></div>
<div class="WritingTitle"><font face="Fixedsys"><font color="#008000">session的安全码是完全没有意义的。呵呵&nbsp;.<br />
<br />
</font><font color="#0000ff">Set&nbsp;</font>Jpeg&nbsp;<font color="#000080">=&nbsp;</font>Server<font color="#000080">.</font>CreateObject<font color="#000080">(</font><font color="#800000">&quot;Persits.Jpeg&quot;</font><font color="#000080">)&nbsp;</font></font><font face="Fixedsys"><font color="#008000">'调用组件<br />
</font>Jpeg<font color="#000080">.</font>Open&nbsp;Server<font color="#000080">.</font>MapPath<font color="#000080">(</font><font color="#800000">&quot;t.jpg&quot;</font><font color="#000080">)&nbsp;</font></font><font face="Fixedsys"><font color="#008000">'打开准备的图片<br />
</font>Jpeg<font color="#000080">.</font>Canvas<font color="#000080">.</font>Font<font color="#000080">.</font>Color&nbsp;<font color="#000080">=&nbsp;&amp;</font>HFFFFFF<br />
Jpeg<font color="#000080">.</font>Canvas<font color="#000080">.</font>Font<font color="#000080">.</font>Family&nbsp;<font color="#000080">=&nbsp;</font></font><font face="Fixedsys"><font color="#800000">&quot;Arial&nbsp;Black&quot;<br />
</font>Jpeg<font color="#000080">.</font>Canvas<font color="#000080">.</font>Font<font color="#000080">.</font>Bold&nbsp;<font color="#000080">=&nbsp;</font></font><font face="Fixedsys"><font color="#0000ff">false<br />
</font>Jpeg<font color="#000080">.</font>Canvas<font color="#000080">.</font>PrintText&nbsp;<font color="#800080">0</font><font color="#000080">,&nbsp;-</font><font color="#800080">2</font><font color="#000080">,&nbsp;</font>random_num<br />
jpeg<font color="#000080">.</font>save&nbsp;Server<font color="#000080">.</font>MapPath<font color="#000080">(</font><font color="#800000">&quot;tt.jpg&quot;</font><font color="#000080">)&nbsp;</font></font><font face="Fixedsys" color="#008000">'保存<br />
</font><font face="Fixedsys"><font color="#8000ff">%&gt;<br />
<br />
<br />
<br />
</font>12、如何让AspJpeg组件支援数据库？<br />
图片存进数据库只能以二进制数据保存，这里即利用AspJpeg的Binary方法，</font></div>
<div class="WritingTitle"><font face="Fixedsys">下面以两个AspJpeg用户手册上的代码为例，具体请参考AspJpeg用户手册：<br />
Opening&nbsp;Images&nbsp;from&nbsp;Memory<br />
<br />
<font color="#8000ff">&lt;%</font></font><font face="Fixedsys"><font color="#008000">'&nbsp;Using&nbsp;ADO,&nbsp;open&nbsp;database&nbsp;with&nbsp;an&nbsp;image&nbsp;blob<br />
</font>strConnect&nbsp;<font color="#000080">=&nbsp;</font><font color="#800000">&quot;DRIVER={Microsoft&nbsp;Access&nbsp;Driver&nbsp;(*.mdb)};DBQ=&quot;&nbsp;</font><font color="#000080">&amp;&nbsp;</font>Server<font color="#000080">.</font>MapPath<font color="#000080">(</font><font color="#800000">&quot;../db/aspjpeg.mdb&quot;</font></font><font face="Fixedsys"><font color="#000080">)<br />
</font><font color="#0000ff">Set&nbsp;</font>rs&nbsp;<font color="#000080">=&nbsp;</font>Server<font color="#000080">.</font>CreateObject<font color="#000080">(</font><font color="#800000">&quot;adodb.recordset&quot;</font></font><font face="Fixedsys"><font color="#000080">)<br />
</font>SQL&nbsp;<font color="#000080">=&nbsp;</font><font color="#800000">&quot;select&nbsp;image_blob&nbsp;from&nbsp;images2&nbsp;where&nbsp;id&nbsp;=&nbsp;&quot;&nbsp;</font><font color="#000080">&amp;&nbsp;</font>Request<font color="#000080">(</font><font color="#800000">&quot;id&quot;</font></font><font face="Fixedsys"><font color="#000080">)<br />
</font>rs<font color="#000080">.</font>Open&nbsp;SQL<font color="#000080">,&nbsp;</font>strConnect<font color="#000080">,&nbsp;</font><font color="#800080">1</font><font color="#000080">,&nbsp;</font></font><font face="Fixedsys"><font color="#800080">3<br />
</font><font color="#0000ff">Set&nbsp;</font>Jpeg&nbsp;<font color="#000080">=&nbsp;</font>Server<font color="#000080">.</font>CreateObject<font color="#000080">(</font><font color="#800000">&quot;Persits.Jpeg&quot;</font></font><font face="Fixedsys" color="#000080">)<br />
</font><font face="Fixedsys"><font color="#008000">'&nbsp;Open&nbsp;image&nbsp;directly&nbsp;from&nbsp;recordset<br />
</font>Jpeg<font color="#000080">.</font>OpenBinary&nbsp;rs<font color="#000080">(</font><font color="#800000">&quot;image_blob&quot;</font><font color="#000080">).</font>Value<br />
</font><font face="Fixedsys"><font color="#008000">'&nbsp;Resize<br />
</font>jpeg<font color="#000080">.</font>Width&nbsp;<font color="#000080">=&nbsp;</font>Request<font color="#000080">(</font><font color="#800000">&quot;Width&quot;</font></font><font face="Fixedsys" color="#000080">)<br />
</font><font face="Fixedsys"><font color="#008000">'&nbsp;Set&nbsp;new&nbsp;height,&nbsp;preserve&nbsp;original&nbsp;aspect&nbsp;ratio<br />
</font>jpeg<font color="#000080">.</font>Height&nbsp;<font color="#000080">=&nbsp;</font>jpeg<font color="#000080">.</font>OriginalHeight&nbsp;<font color="#000080">*&nbsp;</font>jpeg<font color="#000080">.</font>Width&nbsp;<font color="#000080">/&nbsp;</font>jpeg<font color="#000080">.</font>OriginalWidth<br />
Jpeg<font color="#000080">.</font>SendBinary<br />
rs<font color="#000080">.</font>Close<br />
</font><font face="Fixedsys"><font color="#8000ff">%&gt;<br />
<br />
<br />
<br />
</font>Output&nbsp;to&nbsp;Memory<br />
<br />
</font><font face="Fixedsys" color="#8000ff">&lt;%<br />
</font><font face="Fixedsys"><font color="#000080">...<br />
</font><font color="#0000ff">Set&nbsp;</font>rs&nbsp;<font color="#000080">=&nbsp;</font>Server<font color="#000080">.</font>CreateObject<font color="#000080">(</font><font color="#800000">&quot;adodb.recordset&quot;</font></font><font face="Fixedsys"><font color="#000080">)<br />
</font>rs<font color="#000080">.</font>Open&nbsp;<font color="#800000">&quot;images&quot;</font><font color="#000080">,&nbsp;</font>strConnect<font color="#000080">,&nbsp;</font><font color="#800080">1</font><font color="#000080">,&nbsp;</font></font><font face="Fixedsys"><font color="#800080">3<br />
</font>rs<font color="#000080">.</font>AddNew<br />
rs<font color="#000080">(</font><font color="#800000">&quot;image_blob&quot;</font><font color="#000080">).</font>Value&nbsp;<font color="#000080">=&nbsp;</font>Jpeg<font color="#000080">.</font>Binary<br />
rs<font color="#000080">.</font>Update<br />
</font><font face="Fixedsys" color="#000080">...<br />
</font><font face="Fixedsys"><font color="#8000ff">%&gt;<br />
<br />
</font>一个生成文字水印的过程<br />
</font><font face="Fixedsys" color="#8000ff">&lt;%<br />
</font><font face="Fixedsys"><font color="#008000">'call&nbsp;jpegclass(图片相对路径,&nbsp;文字字体大小,&nbsp;文字字体,&nbsp;是否加粗,&nbsp;距顶部距离,&nbsp;距左边距离,&nbsp;水印内容)<br />
<br />
</font><font color="#0000ff">Sub&nbsp;</font>jpegclass<font color="#000080">(</font>J_imgurl<font color="#000080">,&nbsp;</font>J_fontsize<font color="#000080">,&nbsp;</font>J_family<font color="#000080">,&nbsp;</font>J_isbold<font color="#000080">,&nbsp;</font>J_top<font color="#000080">,&nbsp;</font>J_Left<font color="#000080">,&nbsp;</font>J_Content<font color="#000080">)&nbsp;</font></font><font face="Fixedsys"><font color="#008000">'调用过程名<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000ff">If&nbsp;</font>Len<font color="#000080">(</font>J_imgurl<font color="#000080">)&nbsp;=&nbsp;</font><font color="#800080">0&nbsp;</font><font color="#0000ff">Or&nbsp;</font>Len<font color="#000080">(</font>J_Content<font color="#000080">)&nbsp;=&nbsp;</font><font color="#800080">0&nbsp;</font></font><font face="Fixedsys"><font color="#0000ff">Then&nbsp;Exit&nbsp;Sub<br />
&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;</font>JPEG<font color="#000080">,&nbsp;</font>font_color<font color="#000080">,&nbsp;</font>font_size<font color="#000080">,&nbsp;</font>font_family<font color="#000080">,&nbsp;</font>f_width<font color="#000080">,&nbsp;</font>f_height<font color="#000080">,&nbsp;</font>f_Content<br />
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#0000ff">Set&nbsp;</font>JPEG&nbsp;<font color="#000080">=&nbsp;</font>Server<font color="#000080">.</font>CreateObject<font color="#000080">(</font><font color="#800000">&quot;Persits.JPEG&quot;</font></font><font face="Fixedsys"><font color="#000080">)<br />
&nbsp;&nbsp;&nbsp;&nbsp;</font>JPEG<font color="#000080">.</font>Open&nbsp;Server<font color="#000080">.</font>MapPath<font color="#000080">(</font>J_imgurl</font><font face="Fixedsys"><font color="#000080">)<br />
&nbsp;&nbsp;&nbsp;&nbsp;</font>font_size&nbsp;<font color="#000080">=&nbsp;</font></font><font face="Fixedsys"><font color="#800080">10<br />
&nbsp;&nbsp;&nbsp;&nbsp;</font>font_family&nbsp;<font color="#000080">=&nbsp;</font></font><font face="Fixedsys"><font color="#800000">&quot;宋体&quot;<br />
&nbsp;&nbsp;&nbsp;&nbsp;</font>f_Left&nbsp;<font color="#000080">=&nbsp;</font></font><font face="Fixedsys"><font color="#800080">5<br />
&nbsp;&nbsp;&nbsp;&nbsp;</font>f_top&nbsp;<font color="#000080">=&nbsp;</font></font><font face="Fixedsys"><font color="#800080">5<br />
&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000ff">If&nbsp;</font>J_fontsize<font color="#000080">&lt;&gt;</font><font color="#800000">&quot;&quot;&nbsp;</font><font color="#0000ff">Then&nbsp;</font>font_size&nbsp;<font color="#000080">=&nbsp;</font>J_fontsize&nbsp;</font><font face="Fixedsys"><font color="#008000">'字体大小<br />
&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000ff">If&nbsp;</font>J_family<font color="#000080">&lt;&gt;</font><font color="#800000">&quot;&quot;&nbsp;</font><font color="#0000ff">Then&nbsp;</font>font_family&nbsp;<font color="#000080">=&nbsp;</font>J_family&nbsp;</font><font face="Fixedsys"><font color="#008000">'字体<br />
&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000ff">If&nbsp;</font>J_top<font color="#000080">&lt;&gt;</font><font color="#800000">&quot;&quot;&nbsp;</font><font color="#0000ff">Then&nbsp;</font>f_Left&nbsp;<font color="#000080">=&nbsp;</font>J_Left&nbsp;</font><font face="Fixedsys"><font color="#008000">'水印离图片左边位置<br />
&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000ff">If&nbsp;</font>J_Left<font color="#000080">&lt;&gt;</font><font color="#800000">&quot;&quot;&nbsp;</font><font color="#0000ff">Then&nbsp;</font>f_top&nbsp;<font color="#000080">=&nbsp;</font>J_top&nbsp;</font><font face="Fixedsys"><font color="#008000">'水印离图片J_top位置<br />
&nbsp;&nbsp;&nbsp;&nbsp;</font>f_Content&nbsp;<font color="#000080">=&nbsp;</font>J_Content<br />
&nbsp;&nbsp;&nbsp;&nbsp;</font><font face="Fixedsys"><font color="#008000">'&nbsp;添加文字水印<br />
&nbsp;&nbsp;&nbsp;&nbsp;</font>JPEG<font color="#000080">.</font>Canvas<font color="#000080">.</font>Font<font color="#000080">.</font>Color&nbsp;<font color="#000080">=&nbsp;&amp;</font>hff0000&nbsp;</font><font face="Fixedsys"><font color="#008000">'&nbsp;红色<br />
&nbsp;&nbsp;&nbsp;&nbsp;</font>JPEG<font color="#000080">.</font>Canvas<font color="#000080">.</font>Font<font color="#000080">.</font>family&nbsp;<font color="#000080">=&nbsp;</font>font_family<br />
&nbsp;&nbsp;&nbsp;&nbsp;JPEG<font color="#000080">.</font>canvas<font color="#000080">.</font>font<font color="#000080">.</font>Size&nbsp;<font color="#000080">=&nbsp;</font>font_size<br />
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#0000ff">If&nbsp;</font>J_isbold&nbsp;<font color="#000080">=&nbsp;</font><font color="#800080">1&nbsp;</font></font><font face="Fixedsys"><font color="#0000ff">Then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font>JPEG<font color="#000080">.</font>Canvas<font color="#000080">.</font>Font<font color="#000080">.</font>Bold&nbsp;<font color="#000080">=&nbsp;</font></font><font face="Fixedsys"><font color="#0000ff">True<br />
&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;If<br />
&nbsp;&nbsp;&nbsp;&nbsp;</font>JPEG<font color="#000080">.</font>Canvas<font color="#000080">.</font>Print&nbsp;f_Left<font color="#000080">,&nbsp;</font>f_top<font color="#000080">,&nbsp;</font>f_Content<br />
&nbsp;&nbsp;&nbsp;&nbsp;JPEG<font color="#000080">.</font>Save&nbsp;Server<font color="#000080">.</font>MapPath<font color="#000080">(</font>J_imgurl</font><font face="Fixedsys"><font color="#000080">)<br />
&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000ff">Set&nbsp;</font>JPEG&nbsp;<font color="#000080">=&nbsp;</font></font><font face="Fixedsys"><font color="#0000ff">Nothing<br />
End&nbsp;Sub<br />
</font><font color="#8000ff">%&gt;</font></font></div>
<p>&nbsp;</p>]]></description>
	<pubDate>Tue, 16 Sep 2008 00:30:30 +0800</pubDate>
	<author>51soump3.com</author>
	<guid>http://blog.51soump3.com/?action=showlog&amp;gid=66</guid>
</item>
<item>
	<title>Google将发布Chrome[Google版浏览器]</title>
	<link>http://blog.51soump3.com/?action=showlog&amp;gid=65</link>
	<description><![CDATA[<p><a id="ematt:38" target="_blank" href="http://blog.51soump3.com/uploadfile/200809/7644c434622f459996923a2c43b998f420080902184525.png"><img alt="点击查看原图" border="0" src="http://blog.51soump3.com/uploadfile/200809/7644c434622f459996923a2c43b998f420080902184525.png" /></a><br />Google昨天在其<a target="_blank" closure_hashcode_="3670" href="http://googleblog.blogspot.com/2008/09/fresh-take-on-browser.html"><font color="#3188cd">官方Blog</font></a>中更新消息说：他们即将在今天(9月2日）正式在全球100多个国家推出名为Chrome的网络浏览器。由于Google Chrome尚处在测试版阶段，即将推出的版本仅适于Windows系统，而Mac和Linux版本将随后退出。</p><p>&nbsp;<wbr></wbr>这个是其界面：<br /><a id="ematt:39" target="_blank" href="http://blog.51soump3.com/uploadfile/200809/49498dee0693e490e6565ba470c3438a20080902184525.jpg"><img alt="点击查看原图" border="0" src="http://blog.51soump3.com/uploadfile/200809/thum-49498dee0693e490e6565ba470c3438a20080902184525.jpg" /></a><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong>以下为谷歌的官方博客声明</strong>：（以下来自新浪，网址：<a target="_blank" href="http://tech.sina.com.cn/i/2008-09-02/07212428258.shtml"><font color="#000000">http://tech.sina.com.cn/i/2008-09-02/07212428258.shtml</font></a>）</p><p>　　我们通过漫画形式提前发布了一款开源浏览器Google Chrome，相信大家已经通过博客渠道了解到该消息。周二，我们将在全球100多个国家推出Google Chrome测试版。</p><p>　　为什么要开发Google Chrome呢？因为我们相信它能给用户带来更多价值，同时有利于推动Web创新。</p><p>　　在谷歌，大量的工作都是通过浏览器进行的，搜索、聊天、收发邮件和协同开发等。在空闲时间，我们通过浏览器购物，登录网络银行，读新闻，与好友交流等。每天花费在浏览器上的时间如此之多，我们不得不考虑什么样的浏览器最适合当前的Web发展趋势。如今，网页已经从简单的文本页面发展到富媒体页面，这就需要我们重新设计网络浏览器。我们真正需要的不仅仅是一款浏览器，而是一个现代化的网页及应用平台。这就是我们开发Google Chrome的初衷。</p><p>　　从外观即可看出，Google Chrome的设计简单、高效，是一款真正的Web浏览工具。与谷歌主页一样，Google Chrome的特点是简洁、快速。</p><p>　　Google Chrome支持多标签浏览，每个标签页面都在独立的&ldquo;沙箱&rdquo;内运行，在提高安全性的同时，一个标签页面的崩溃也不会导致其他标签页面被关闭。Google Chrome基于更强大的JavaScript V8引擎，这是当前Web浏览器所无法实现的。</p><p>　　当然，这只是一个开始，Google Chrome在很多方面还需要进一步完善。此次，我们即将推出的是Windows下的测试版本，供大家讨论，我们也希望能够得到用户的反馈。目前， Mac和Linux版本尚在开发之中，同样将秉承快速、高效的特点。</p><p>　　Google Chrome是一款开源软件，借鉴了苹果的WebKit、Mozilla的Firefox及其他相关应用。同样，我们也将开放Google Chrome的全部源代码。我们期望与整个开源社区合作，共同推动Web创新。</p><p>　　在当前Web市场，选择和创新越来越多，我们希望Google Chrome能成为一个新选择，推动Web服务更上一层楼。</p>]]></description>
	<pubDate>Tue, 02 Sep 2008 18:44:18 +0800</pubDate>
	<author>51soump3.com</author>
	<guid>http://blog.51soump3.com/?action=showlog&amp;gid=65</guid>
</item>
<item>
	<title>php生成excel文件[附图]</title>
	<link>http://blog.51soump3.com/?action=showlog&amp;gid=63</link>
	<description><![CDATA[<p>可以在线生成excel文件的php程序<br />代码如下:<br />&lt;?php<br />header(&quot;Content-type:Applicationvnd.ms-execl&quot;);<br />header(&quot;content-Disposition:filename=blog.51soump3.com.xls&quot;);<br />?&gt;<br />&lt;html xmlns=&quot;<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>&quot;&gt;<br />&lt;head&gt;<br />&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=gb2312&quot; /&gt;<br />&lt;title&gt;小五的博客&lt;/title&gt;<br />&lt;/head&gt;</p>
<p>&lt;body&gt;<br />&lt;table width=&quot;600&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;<br />&nbsp; &lt;tr&gt;<br />&nbsp;&nbsp;&nbsp; &lt;td colspan=&quot;4&quot;&gt;&lt;strong&gt;&lt;a href=&quot;<a href="http://blog.51soump3.com">http://blog.51soump3.com</a>&quot;&gt;小五的博客&lt;/a&gt;&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/td&gt;<br />&nbsp; &lt;/tr&gt;<br />&nbsp; &lt;tr&gt;<br />&nbsp;&nbsp;&nbsp; &lt;td width=&quot;121&quot;&gt;&lt;strong&gt;代表人姓名:&lt;/strong&gt;&lt;/td&gt;<br />&nbsp;&nbsp;&nbsp; &lt;td width=&quot;166&quot;&gt;&amp;nbsp;&lt;/td&gt;<br />&nbsp;&nbsp;&nbsp; &lt;td width=&quot;153&quot;&gt;&lt;strong&gt;团队名称:&lt;/strong&gt;&lt;/td&gt;<br />&nbsp;&nbsp;&nbsp; &lt;td width=&quot;150&quot;&gt;&amp;nbsp;&lt;/td&gt;<br />&nbsp; &lt;/tr&gt;<br />&nbsp; &lt;tr&gt;<br />&nbsp;&nbsp;&nbsp; &lt;td&gt;&lt;strong&gt;现场联系电话:&lt;/strong&gt;&lt;/td&gt;<br />&nbsp;&nbsp;&nbsp; &lt;td&gt;&amp;nbsp;&lt;/td&gt;<br />&nbsp;&nbsp;&nbsp; &lt;td&gt;&lt;strong&gt;团队人数:&lt;/strong&gt;&lt;/td&gt;<br />&nbsp;&nbsp;&nbsp; &lt;td&gt;&amp;nbsp;&lt;/td&gt;<br />&nbsp; &lt;/tr&gt;<br />&nbsp; &lt;tr&gt;<br />&nbsp;&nbsp;&nbsp; &lt;td&gt;&lt;strong&gt;角色出处:&lt;/strong&gt;&lt;/td&gt;<br />&nbsp;&nbsp;&nbsp; &lt;td&gt;&amp;nbsp;&lt;/td&gt;<br />&nbsp;&nbsp;&nbsp; &lt;td&gt;&lt;strong&gt;E-MAIL:&lt;/strong&gt;&lt;/td&gt;<br />&nbsp;&nbsp;&nbsp; &lt;td&gt;&amp;nbsp;&lt;/td&gt;<br />&nbsp; &lt;/tr&gt;<br />&lt;/table&gt;<br />&lt;/body&gt;<br />&lt;/html&gt;<br />生成excel截图:<br /><a target="_blank" href="http://blog.51soump3.com/uploadfile/200808/c6f50f580d811e13621b65966fffbb9a20080831135147.jpg"><img style="WIDTH: 569px; HEIGHT: 125px" height="118" alt="附件[ematt:37] 图" width="569" border="0" src="http://blog.51soump3.com/uploadfile/200808/c6f50f580d811e13621b65966fffbb9a20080831135147.jpg" /></a></p>]]></description>
	<pubDate>Sun, 31 Aug 2008 13:49:34 +0800</pubDate>
	<author>51soump3.com</author>
	<guid>http://blog.51soump3.com/?action=showlog&amp;gid=63</guid>
</item>
<item>
	<title>&quot;奥运加油 中国加油&quot;－－为奥运健儿助威！</title>
	<link>http://blog.51soump3.com/?action=showlog&amp;gid=62</link>
	<description><![CDATA[<p><font color="#ff0000"><strong>&quot;奥运加油 中国加油&quot;－－为奥运健儿助威！<br /><br /><a target="_blank" href="http://blog.51soump3.com/uploadfile/200808/a49d1f1e9c4389f8558556168da69d2820080807203607.jpg"><img style="width: 541px; height: 151px" height="162" alt="附件[ematt:36] 奥运" width="605" border="0" src="http://blog.51soump3.com/uploadfile/200808/a49d1f1e9c4389f8558556168da69d2820080807203607.jpg" /></a><br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </strong></font><font color="#000000">北京奥运已经渐渐向我们走来，北京奥运会圣火的传递正在如火如荼地展开，在五湖四海，在华夏大地播撒奥林匹克所倡导的和平、友谊、光明和希望。13亿中国人民共同期待着奥运圣火点燃中华民族百年梦想的那一刻，全世界热爱和平、崇尚正义、关注奥运的人民，也将共同感受这&ldquo;点燃激情、传递梦想&rdquo;的欢乐与荣耀。富强、民主、和谐，我们生存在同一个世界；更高、更快、更强，我们憧憬的同一个梦想！同一个世界，同一个梦想！同一句口号，同一片心声！2008是中国的2008，2008也是世界的2008。中国将重新面对世界，世界也将重新认识中国！2008愿你我心与心相连，手与手相牵，爱与爱相知，情与情相融，梦与梦相汇，连成一个五环，共祝奥运会圆满成功！北京2008是每一个中国人的骄傲！&ldquo;同一个世界，同一个梦想&rdquo;将会感染激励我们每个人！您虽不能与运动健儿一样驰骋奥运赛场为国争光，但一样可以为奥运呐喊、欢呼并贡献自己的力量，传播奥林匹克精神、传递友谊与和平信息。<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 亲爱的网友们，还等什么，敲响你的键盘，用我们的热情与真诚，在这曲波澜壮阔的北京2008年奥运会序曲上汇入自己的声音，为北京奥运祝福，为来自世界各地的朋友祝福，为中国和世界各地运动员创造的佳绩祝贺，来吧朋友们！<br /><br /><strong><font color="#ff0000">奥运专题新闻：<br /><br /></font></strong><a target="_blank" href="http://2008.sohu.com/"><font color="#336699">搜狐-08奥运频道</font></a>　　　<a target="_blank" href="http://2008.sina.com.cn/"><font color="#336699">新浪-08奥运频道</font></a>　　&nbsp;&nbsp;　&nbsp;&nbsp;<a target="_blank" href="http://2008.163.com/"><font color="#336699">网易-08奥运频道</font></a>　　&nbsp; &nbsp;　<a target="_blank" href="http://2008.qq.com/"><font color="#336699">腾讯网-08奥运频道</font></a><br /><a target="_blank" href="http://www.beijing2008.cn/"><font color="#336699">奥运会官方网站</font></a>　　　 <a target="_blank" href="http://2008.cctv.com/"><font color="#336699">CCTV 奥运网</font></a>　　 　&nbsp; &nbsp;&nbsp; &nbsp; <a target="_blank" href="http://www.xinhuanet.com/olympics/bzay.htm"><font color="#336699">新华网-08奥运频道</font></a>　　 　<a target="_blank" href="http://2008.baidu.com/"><font color="#336699">百度奥运专题</font></a>　　　<br /><br /><br /><font color="#ff0000"><strong>北京奥运知识百科：</strong></font><br /><br /><a target="_blank" href="http://www.beijing2008.cn/spirit/beijing2008/graphic/n214068867.shtml"><font color="#336699">奥林匹克五环</font></a>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a target="_blank" href="http://www.beijing2008.cn/spirit/movement/evolution/"><font color="#336699">奥林匹克运动发展</font></a>　　&nbsp; &nbsp;&nbsp;&nbsp;<a target="_blank" href="http://www.beijing2008.cn/spirit/beijing2008/graphic/n214068869.shtml"><font color="#336699">北京2008年奥运会会徽</font></a>&nbsp; &nbsp;&nbsp;&nbsp;<a target="_blank" href="http://www.beijing2008.cn/spirit/beijing2008/graphic/n214068873.shtml"><font color="#336699">北京2008年奥运会主题口号</font></a><br /><a target="_blank" href="http://www.beijing2008.cn/spirit/symbols/mascots/n214067075.shtml"><font color="#336699">北京奥运会吉祥物</font></a>&nbsp; &nbsp;&nbsp;&nbsp;<a target="_blank" href="http://www.beijing2008.cn/spirit/beijing2008/graphic/n214070362.shtml"><font color="#336699">北京2008年奥运会奖牌</font></a>&nbsp; &nbsp;&nbsp;&nbsp;<a target="_blank" href="http://torchrelay.beijing2008.cn/cn/image/"><font color="#336699">北京2008年奥运会火炬</font></a>&nbsp; &nbsp;&nbsp;&nbsp;<a target="_blank" href="http://aoyun.cctv.com/special/zhongguojiayou/20080530/108017.shtml"><font color="#336699">&quot;奥运加油中国加油&quot;赛场手势</font></a> </font></p>]]></description>
	<pubDate>Thu, 07 Aug 2008 20:36:07 +0800</pubDate>
	<author>51soump3.com</author>
	<guid>http://blog.51soump3.com/?action=showlog&amp;gid=62</guid>
</item>
<item>
	<title>Sqlite中文资料</title>
	<link>http://blog.51soump3.com/?action=showlog&amp;gid=60</link>
	<description><![CDATA[<p>介绍<br />这是嵌入式SQL数据库引擎SQLite（SQLite Embeddable SQL Database Engine）的一个扩展。SQLite是一个实现嵌入式SQL数据库引擎的 C语言库（C library）。用SQLite连接的程序可以使用SQL数据库，但不需要运行一个单独的关系型数据库管理系统进程（separate RDBMS process）。<br />SQLite不是一个用于连接到大型数据库服务器（big database server）的客户端库（client library）。SQLite是一个服务器。SQLite直接读写（reads and writes directly）在硬盘上的数据库文件。<br />注：更多关于SQLite的资料请查看SQLite的网站（<a href="http://sqlite.org/">http://sqlite.org/</a>）。 <br />安装<br />请阅读在安装包里的 INSTALL 文件。或者使用PEAR installer with &quot;pear install sqlite&quot;。SQLite已经内置了，你不需要安装任何附加的软件（additional software）。<br />Windows users可以下载SQLite扩展DLL（php_sqlite.dl）。 <br />需求<br />为了可以使用那些函数，你必须编译带上SQLite支持PHP（compile PHP with SQLite support），或者在你的php.ini加载SQLite扩展。<br />资源类型<br /><br />有两个在SQLite界面（the SQLite Interface）可用的资源。第一个是数据库连接（the database connection），第二是计算结果设置（the result set）。 <br />预定义常量<br />函数sqlite_fetch_array()和sqlite_current()使用一个常量表示不同的返回类型。下面的常量（表格 1.）已经被定义：<br />表格 1. SQLite 常量<br />常量名 意义<br />SQLITE_ASSOC Columns are returned into the array having the fieldname as the array index. <br />SQLITE_BOTH Columns are returned into the array having both a numerical index and the fieldname as the array index. <br />SQLITE_NUM Columns are returned into the array having a numerical index to the fields. This index starts with 0, the first field in the result.&nbsp; <br />运行时配置<br />这些函数的行为受到全局配置文件 php.ini 的影响。<br />表格 2. SQLite Configuration Options<br />Name Default Changeable <br />sqlite.assoc_case 0 PHP_INI_ALL&nbsp; <br />For further details and definition of the PHP_INI_* constants see ini_set().&nbsp; <br />以下是该配置选项的简要解释。 <br />sqlite.assoc_case int<br />Whether to use mixed case (0), upper case (1) or lower case (2) hash indexes. <br />This option is primarily useful when you need compatibility with other database systems, where the names of the columns are always returned as uppercase or lowercase, regardless of the case of the actual field names in the database schema. <br />The SQLite library returns the column names in their natural case (that matches the case you used in your schema). When sqlite.assoc_case is set to 0 the natural case will be preserved. When it is set to 1 or 2, PHP will apply case folding on the hash keys to upper- or lower-case the keys, respectively. <br />Use of this option incurs a slight performance penalty, but is MUCH faster than performing the case folding yourself using PHP script.&nbsp; <br />目录<br />sqlite_array_query &mdash;&mdash; 发送一条 SQL 查询，并返回一个数组。<br />sqlite_busy_timeout &mdash;&mdash; 设置超时时间（busy timeout duration），或者频繁的用户失去权限（disable busy handlers）。<br />sqlite_changes &mdash;&mdash; 返回被最新的SQL 查询（changed by the most recent SQL statement）改变的行数。<br />sqlite_close &mdash;&mdash; 关闭一个打开的SQLite数据库。<br />sqlite_column &mdash;&mdash; 在当前的行中取得一列（a column from the current row of a result set）。<br />sqlite_create_aggregate &mdash;&mdash; Register an aggregating UDF for use in SQL statements。<br />sqlite_create_function &mdash;&mdash; Registers a &quot;regular&quot; User Defined Function for use in SQL statements。<br />sqlite_current &mdash;&mdash; 在返回的数组中取得当前的行（the current row from a result set as an array）。<br />sqlite_error_string &mdash;&mdash; 返回错误代码的原始描述（the textual description of an error code）。<br />sqlite_escape_string &mdash;&mdash; 释放一个用于查询的字符串（Escapes a string for use as a query parameter）。<br />sqlite_fetch_array &mdash;&mdash; 取得下一行并设置成一个数组（the next row from a result set as an array）。<br />sqlite_fetch_single &mdash;&mdash; 取得第一列并设置成一个字符串（Fetches the first column of a result set as a string）。<br />sqlite_fetch_string &mdash;&mdash; sqlite_fetch_single()的别名。<br />sqlite_field_name &mdash;&mdash; 取得结果中指定字段的字段名。<br />sqlite_has_more &mdash;&mdash; 返回是否有更多可用的行（whether or not more rows are available）。<br />sqlite_last_error &mdash;&mdash; 返回数据库的最新的错误代码（the error code of the last error for a database）。<br />sqlite_last_insert_rowid &mdash;&mdash; 返回最新插入的行的行号（the most recently inserted row）。<br />sqlite_libencoding &mdash;&mdash; 返回SQLite库（SQLite library）的编码（encoding）。<br />sqlite_libversion &mdash;&mdash; 返回SQLite库（SQLite library）的版本。<br />sqlite_next &mdash;&mdash; 返回下一行的行号。<br />sqlite_num_fields &mdash;&mdash; 取得结果集中字段的数目。<br />sqlite_num_rows &mdash;&mdash; 取得结果集中行的数目。<br />sqlite_open &mdash;&mdash; 打开一个SQLite数据库。如果文件不存在则尝试创建之。<br />sqlite_popen &mdash;&mdash; 用永久连接的方式打开一个SQLite数据库。如果文件不存在则尝试创建之。<br />sqlite_query &mdash;&mdash; 发送一条 SQL 查询，并返回一个结果句柄（a result handle）。<br />sqlite_rewind &mdash;&mdash; 倒回第一行（Seek to the first row number）。<br />sqlite_seek &mdash;&mdash; 在缓存结果中查找特定的行号（Seek to a particular row number of a buffered result set）。<br />sqlite_udf_decode_binary &mdash;&mdash; Decode binary data passed as parameters to an UDF。<br />sqlite_udf_encode_binary &mdash;&mdash; Encode binary data before returning it from an UDF。<br />sqlite_unbuffered_query &mdash;&mdash; 发送一条 SQL 查询，并不获取和缓存结果的行。</p>
<p>关于Sqlite的问答<br />为什么选择 SQLite 来捆绑而不用其它数据库？恐怕 PHP 想把 ASP 赶下台了。<br />对于 PHP 所开发的留言本，整站等程序，为什么使用率比 ASP 低呢？很大原因是数据库的安装，对于一般用户，安装一个 MySQL 数据库相对比较难的，而 Access 则只需要修改数据库路径即可，数据库和站点文件放在一起，非常方便。现在好了，PHP5 将 SQLite 捆绑了，相信以后会出很多相关的应用程序，而这些应用程序的数据库安装相信可以和 ASP 媲美，速度又比 MySQL 快上 1-2 倍（官方的数据），存储量又不是问题（最大可超过 2TB－2000GB，官方数据）。只是对于并发访问我比较担心，还没有测试过不知道如何。呵呵，但是相信这是 PHP 的明智选择，即使服务器不支持 SQLite ，也可以通过加载 php_sqlite.dll 来实现 SQLite 的支持。恩，为什么没有早点想到使用它呢？恐怕是有以下几点原因：<br />1.当初还不健壮－－即使现在也不知道是不是健壮，代码就那么几百K，呵呵，和 MySQL 对比起来&hellip;&hellip;<br />2.感觉好像有点文件系统的味道，就一个数据库文件包含了所有数据&hellip;&hellip;<br />3.不支持表的无损修改，也就是说不支持 ALTER TABLE ，这恐怕带来了不少麻烦。改变数据表结构就要重建表，不过有其他方法解决。<br />4.只支持 left join ，不过差不多够用了，对小型程序来说。<br />5.优化数据表恐怕比较麻烦。<br />优点还是很多的，我看了下：<br />1.安装方便<br />2.支持大量数据<br />3.支持大部分SQL<br />4.弱数据类型<br />5.速度快（没有测试，官方说法）<br />6.体积小<br />7.具备 Command 窗口，下载一个 SQLite.exe 文件即可对数据库进行命令行操作，和 MySQL 差不多的样子，不过显然不如 MySQL 友好和强大。<br />8.完全公开的源代码和版权 </p>
<p>其他想到再说，感觉 SQLite 很不错的，PEAR 已经提供扩展类支持了。有兴趣下载了看看。 <br />翻译了一部分 FAQ， 英语水平差，可能不准确，翻译得很累，有兴趣的帮忙翻译几段。 <br />常见问答（FAQ）<br />（最后更新：2004/03/20 15:34:56） <br /><a href="http://www.sqlite.org/faq.html">http://www.sqlite.org/faq.html</a> <br />(1) 如何创建自增字段？ <br />(2) SQLite 支持哪些数据类型？ <br />(3) 为什么能向 SQLite 数据库的整型字段中插入字符串？ <br />(4) 为什么 SQLite 认为表达式 '0'=='00' 为真？ <br />(5) 为什么 SQLite 不允许在同一张表里使用 '0' 和 '0.0' 作为两个不同的行的主键？ <br />(6) 为什么不能在 Linux box 中读取在 SparcStation 中创建的 SQLite 数据库？ <br />(7) 多个应用程序或者同一个应用程序的多个例程能同时存取同一个数据库文件吗？ <br />(8) Is SQLite threadsafe? <br />(9) 如何列出一个 SQLite 数据库中的所有的表/索引？ <br />(10) 有对 SQLite 数据库的任何已知的大小的限制吗？ <br />(11) 在 SQLite 中 VARCHAR 的最大长度是多少？ <br />(12) SQLite 是否支持 BLOB 类型？ <br />(13) 如何从一个已存在的 SQLite 数据表中添加/删除字段？ <br />(14) 我删除了很多数据但是数据库文件并没有减小，是不是 Bug？ <br />(15) 是否能将 SQLite 用于商业用途而不用交版税？&nbsp; <br />-------------------------------------------------------------------------------- <br />(1) 如何创建自增字段？ <br />简单的回答：一个声明为 INTEGER PRIMARY KEY 的字段将自动增加。 <br />这里是详细的答案： 从 SQLite 的 2.3.4 版本开始，如果你将一个表中的一个字段声明为 INTEGER PRIMARY KEY，那么无论你何时向该表的该字段插入一个 NULL 值，这个 NULL 值将自动被更换为比表中该字段所有行的最大值大 1 的整数；如果表为空，那么将被更换为 1。比如，假设你有这样的一张数据表:&nbsp; <br />CREATE TABLE t1(<br />a INTEGER PRIMARY KEY,<br />b INTEGER<br />);<br />在这张数据表里，声明 <br />INSERT INTO t1 valueS(NULL,123);<br />在逻辑意义上等价于： <br />INSERT INTO t1 valueS((SELECT max(a) FROM t1)+1,123);<br />至于 SQLite 的 2.2.0 到 2.3.3 版本，如果你向一个 INTEGER PRIMARY KEY 字段插入 NULL 值, 它将被替换为一个唯一的整数，但它是个半随机的整数。通过这种方式产生的唯一键将不是连续的。而 SQLite 的 2.3.4 及其以后版本，唯一键将是连续的直到其最大值超过 2147483647。这是 32 位整型的最大值因而不能继续增加。因此在 SQLite 的 2.3.3 及其早期版本，并发的插入尝试将返回一个半随机的键生成算法。 <br />从 2.2.3 版本开始，一个新的名为 sqlite_last_insert_rowid() 的 API 函数将为最近的插入操作返回一个整型键。详细资料请查看 API 手册 </p>
<p>-------------------------------------------------------------------------------- <br />(2) SQLite 支持哪些数据类型？ <br />SQLite 是弱类型的。所有数据以无终止的字符串存储。在 CREATE TABLE 中，字段名后面的数据类型信息将被忽略（大部分），你可以往任何字段插入你想要的数据类型，而不用管那个字段被声明为什么类型。 <br />这个规则的一个例外是字段为 INTEGER PRIMARY KEY 类型。这样的字段强制一个整型。往 INTEGER PRIMARY KEY 字段插入任何非整型数据将产生一个错误。 <br />这是一个在 SQLite 的数据类型 中更深入解释这一概念的页面。 </p>
<p>-------------------------------------------------------------------------------- <br />(3) 为什么能向 SQLite 数据库的整型字段中插入字符串？ <br />这是一个特点,不是错误。SQLite 是弱类型的。任何数据都能够插入任何字段中。你可以往整型字段中插入任意长度的字符串，或者往布尔字段中插入浮点数，或者往字符字段中插入日期。在 CREATE TABLE 命令中你指定给这个字段的数据类型不会限制插入这个字段的数据。所有的字段可以插入任意长度的字符串。（有一个例外：以 INTEGER PRIMARY KEY 为类型的字段只允许整数。如果你尝试往一个 INTEGER PRIMARY KEY 字段插入非整型数据，将产生一个错误。） <br />然而数据类型是影响值的比较的。因为在一个数字类型（比如 &quot;integer&quot;）字段中，任何字符串在进行比较和排序时是被看成处理成数值的数字。考虑这两个命令序列： <br />CREATE TABLE t1(a INTEGER UNIQUE); CREATE TABLE t2(b TEXT UNIQUE);<br />INSERT INTO t1 valueS('0'); INSERT INTO t2 valueS(0);<br />INSERT INTO t1 valueS('0.0'); INSERT INTO t2 valueS(0.0);<br />在左边的序列中，第二条插入语句将失败。这种情况下，当字符串 '0' 和 '0.0' 插入一个数字类型字段中时将被处理成数字而 0==0.0 违反了唯一性约束。但是右边序列中的第二条插入语句正常执行。这种情况下，常量 0 和 0.0 被处理成字符串意味着它们是截然不同的。 <br />这是一个在 SQLite 的数据类型 中更深入解释这一概念的页面。 </p>
<p>-------------------------------------------------------------------------------- <br />(4) 为什么 SQLite 认为表达式 '0'=='00' 为真？ <br />在 2.7.0 之后，表达式不成立。 <br />但是如果两个值之一在一个数字类型字段中比较，另一个将被转化为数字而不是字符串，而且结果成立。例如： <br />CREATE TABLE t3(a INTEGER, b TEXT);<br />INSERT INTO t3 valueS(0,0);<br />SELECT count(*) FROM t3 WHERE a=='00';<br />上面序列中的 SELECT 语句返回 1。字段 &quot;a&quot; 是数字类型所以在 WHERE 子句中字符串 '00' 被转换成一个数字作为和 'a' 的比较。0==00 所以这个测试返回 TRUE。现在考虑一个不同的 SELECT 语句： <br />SELECT count(*) FROM t3 WHERE b=='00';<br />在这种情况下答案是 0。'b' 是一个 text 字段，文本不匹配 '00'。'0'!='00' 因此 WHERE 子句返回 FALSE 而返回行数为 0。 <br />这是一个在 SQLite 的数据类型 中更深入解释这一概念的页面。 </p>
<p>-------------------------------------------------------------------------------- <br />(5) 为什么 SQLite 不允许在同一张表里使用 '0' 和 '0.0' 作为两个不同的行的主键？ <br />你的主键必定是数字类型。将数据类型改成 TEXT 后即可正常运行。 <br />每一行必须有一个唯一的主键。作为一个数字类型的字段，SQLite 认为 '0' 和 '0.0' 的值是相同的，因为他们在数字上的比较是相等的（看前面的问题）因此值不是唯一的。 </p>
<p>-------------------------------------------------------------------------------- <br />(6) 为什么不能在 Linux box 中读取在 SparcStation 中创建的 SQLite 数据库？ <br />你需要升级你的 SQLite 库到 2.6.3 或更新版本。 <br />你的 linux box 上的 x86 处理器是 little-endian （意味着整数中的最低位的字节排在前面），但是 Sparc 是 big-endian （最高位的字节排在前面）。在 SQLite 低于 2.6.3 版本的时候，创建于 little-endian 体系中的 SQLite 数据库不能运行于 big-endian 的机器上。从 2.6.3 版本开始，SQLite 应该能够读写数据库文件而不管创建数据库的机器的字节顺序如何。 </p>
<p>-------------------------------------------------------------------------------- <br />(7) 多个应用程序或者同一个应用程序的多个例程能同时存取同一个数据库文件吗？ <br />多个程序能够在同一时间打开同一个数据库，能够同时执行 SELECT 命令。但是一次只能有一个进程改变数据库。 <br />Win95/98/ME 操作系统缺乏读/写锁定支持。在 2.7.0 版本之前，这意味着在 Windows 下你一次只能对数据库做单一的读处理。这个问题在 2.7.0 版本中已经通过一个 Windows 下的用户空间读写概率统计策略（implementing a user-space probabilistic reader/writer locking strategy）Windows 现在和 UNIX 一样允许多重的读操作。<br />The locking mechanism used to control simultaneous access might not work correctly if the database file is kept on an NFS filesystem. This is because file locking is broken on some NFS implementations. You should avoid putting SQLite database files on NFS if multiple processes might try to access the file at the same time. On Windows, Microsoft's documentation says that locking may not work under FAT filesystems if you are not running the Share.exe daemon. People who have a lot of experience with Windows tell me that file locking of network files is very buggy and is not dependable. If what they say is true, sharing an SQLite ourse-grained. SQLite locks the entire database. Big database servers (PostgreSQL, Oracle, etc.) generally have finer grained locking, such as locking on a single table or a single row within a table. If you have a massively parallel database application, you should consider using a big database server instead of SQLite. <br />database between two or more Windows machines might cause unexpected problems. <br />Locking in SQLite is very c&nbsp; <br />When SQLite tries to access a file that is locked by another process, the default behavior is to return SQLITE_BUSY. You can adjust this behavior from C code using the sqlite_busy_handler() or sqlite_busy_timeout() API functions. See the API documentation for details. <br />If two or more processes have the same database open and one process creates a new table or index, the other processes might not be able to see the new table right away. You might have to get the other processes to close and reopen their connection to the database before they will be able to see the new table. </p>
<p>-------------------------------------------------------------------------------- <br />(8) Is SQLite threadsafe? <br />Yes. Sometimes. In order to be thread-safe, SQLite must be compiled with the THREADSAFE preprocessor macro set to 1. In the default distribution, the windows binaries are compiled to be threadsafe but the linux binaries are not. If you want to change this, you'll have to recompile. <br />&quot;Threadsafe&quot; in the previous paragraph means that two or more threads can run SQLite at the same time on different &quot;sqlite&quot; structures returned from separate calls to sqlite_open(). It is never safe to use the same sqlite structure pointer simultaneously in two or more threads. <br />Note that if two or more threads have the same database open and one thread creates a new table or index, the other threads might not be able to see the new table right away. You might have to get the other threads to close and reopen their connection to the database before they will be able to see the new table. <br />Under UNIX, you should not carry an open SQLite database across a fork() system call into the child process. Problems will result if you do. </p>
<p>-------------------------------------------------------------------------------- <br />(9) 如何列出一个 SQLite 数据库中的所有的表/索引？ <br />If you are running the sqlite command-line access program you can type &quot;.tables&quot; to get a list of all tables. Or you can type &quot;.schema&quot; to see the complete database schema including all tables and indices. Either of these commands can be followed by a LIKE pattern that will restrict the tables that are displayed. <br />From within a C/C++ program (or a script using Tcl/Ruby/Perl/Python bindings) you can get access to table and index names by doing a SELECT on a special table named &quot;SQLITE_MASTER&quot;. Every SQLite database has an SQLITE_MASTER table that defines the schema for the database. The SQLITE_MASTER table looks like this: <br />CREATE TABLE sqlite_master (<br />type TEXT,<br />name TEXT,<br />tbl_name TEXT,<br />rootpage INTEGER,<br />sql TEXT<br />);<br />For tables, the type field will always be 'table' and the name field will be the name of the table. So to get a list of all tables in the database, use the following SELECT command: <br />SELECT name FROM sqlite_master<br />WHERE type='table'<br />ORDER BY name;<br />For indices, type is equal to 'index', name is the name of the index and tbl_name is the name of the table to which the index belongs. For both tables and indices, the sql field is the text of the original CREATE TABLE or CREATE INDEX statement that created the table or index. For automatically created indices (used to implement the PRIMARY KEY or UNIQUE constraints) the sql field is NULL. <br />The SQLITE_MASTER table is read-only. You cannot change this table using UPDATE, INSERT, or DELETE. The table is automatically updated by CREATE TABLE, CREATE INDEX, DROP TABLE, and DROP INDEX commands. <br />Temporary tables do not appear in the SQLITE_MASTER table. Temporary tables and their indices and triggers occur in another special table named SQLITE_TEMP_MASTER. SQLITE_TEMP_MASTER works just like SQLITE_MASTER except that it is only visible to the application that created the temporary tables. To get a list of all tables, both permanent and temporary, one can use a command similar to the following:&nbsp; <br />SELECT name FROM <br />(SELECT * FROM sqlite_master UNION ALL<br />SELECT * FROM sqlite_temp_master)<br />WHERE type='table'<br />ORDER BY name <br />-------------------------------------------------------------------------------- <br />(10) 有对 SQLite 数据库的任何已知的大小的限制吗？ <br />As of version 2.7.4, SQLite can handle databases up to 2^41 bytes (2 terabytes) in size on both Windows and Unix. Older version of SQLite were limited to databases of 2^31 bytes (2 gigabytes). <br />SQLite arbitrarily limits the amount of data in one row to 1 megabyte. There is a single #define in the source code that can be changed to raise this limit as high as 16 megabytes if desired. <br />There is a theoretical limit of about 2^32 (4 billion) rows in a single table, but this limit has never been tested. <br />There is also a theoretical limit of about 2^32 tables and indices. <br />The name and &quot;CREATE TABLE&quot; statement for a table must fit entirely within a 1-megabyte row of the SQLITE_MASTER table. Other than this, there are no constraints on the length of the name of a table, or on the number of columns, etc. Indices are similarly unconstrained. <br />The names of tables, indices, view, triggers, and columns can be as long as desired. However, the names of SQL functions (as created by the sqlite_create_function() API) may not exceed 255 characters in length. </p>
<p>-------------------------------------------------------------------------------- <br />(11) 在 SQLite 中 VARCHAR 的最大长度是多少？ <br />Remember, SQLite is typeless. A VARCHAR column can hold as much data as any other column. The total amount of data in a single row of the database is limited to 1 megabyte. You can increase this limit to 16 megabytes, if you need to, by adjusting a single #define in the source tree and recompiling. <br />For maximum speed and space efficiency, you should try to keep the amount of data in a single row below about 230 bytes. </p>
<p>-------------------------------------------------------------------------------- <br />(12) SQLite 是否支持 BLOB 类型？ <br />You can declare a table column to be of type &quot;BLOB&quot; but it will still only store null-terminated strings. This is because the only way to insert information into an SQLite database is using an INSERT SQL statement, and you can not include binary data in the middle of the ASCII text string of an INSERT statement. <br />SQLite is 8-bit clean with regard to the data it stores as long as the data does not contain any '\000' characters. If you want to store binary data, consider encoding your data in such a way that it contains no NUL characters and inserting it that way. You might use URL-style encoding: encode NUL as &quot;%00&quot; and &quot;%&quot; as &quot;%25&quot;. Or, you might consider encoding your binary data using base-64. There is a source file named &quot;src/encode.c&quot; in the SQLite distribution that contains implementations of functions named &quot;sqlite_encode_binary() and sqlite_decode_binary() that can be used for converting binary data to ASCII and back again, if you like. </p>
<p>-------------------------------------------------------------------------------- <br />(13) 如何从一个已存在的 SQLite 数据表中添加/删除字段？ <br />SQLite does not support the &quot;ALTER TABLE&quot; SQL command. If you what to change the structure of a table, you have to recreate the table. You can save existing data to a temporary table, drop the old table, create the new table, then copy the data back in from the temporary table. <br />For example, suppose you have a table named &quot;t1&quot; with columns names &quot;a&quot;, &quot;b&quot;, and &quot;c&quot; and that you want to delete column &quot;c&quot; from this table. The following steps illustrate how this could be done:&nbsp; <br />BEGIN TRANSACTION;<br />CREATE TEMPORARY TABLE t1_backup(a,B);<br />INSERT INTO t1_backup SELECT a,b FROM t1;<br />DROP TABLE t1;<br />CREATE TABLE t1(a,B);<br />INSERT INTO t1 SELECT a,b FROM t1_backup;<br />DROP TABLE t1_backup;<br />COMMIT; <br />-------------------------------------------------------------------------------- <br />(14) 我删除了很多数据但是数据库文件并没有减小，是不是 Bug？ <br />不是的。当你从 SQLite 删除数据之后，未使用的磁盘空间被添加到一个内在的&ldquo;空闲列表&rdquo;中用于存储你下次插入的数据。磁盘空间并没有丢失，但是也不向操作系统返回磁盘空间。 <br />如果你删除了大量的数据且想要减小数据库文件，执行 VACUUM 命令（2.8.1 或更新版本)。VACUUM 命令将重建数据库will reconstruct the database from scratch. This will leave the database with an empty free-list and a file that is minimal in size. Note, however, that the VACUUM can take some time to run (around a half second per megabyte on the Linux box where SQLite is developed) and it can use up to twice as much temporary disk space as the original file while it is running.&nbsp; </p>
<p>-------------------------------------------------------------------------------- <br />(15) 是否能将 SQLite 用于商业用途而不用交版税？ <br />可以。SQLite 是公开的。代码的任何部分都没有声明所有权。你可以用它来做你想要的任何事情.</p>]]></description>
	<pubDate>Mon, 04 Aug 2008 21:57:41 +0800</pubDate>
	<author>51soump3.com</author>
	<guid>http://blog.51soump3.com/?action=showlog&amp;gid=60</guid>
</item>
<item>
	<title>查本机DNS方法</title>
	<link>http://blog.51soump3.com/?action=showlog&amp;gid=59</link>
	<description><![CDATA[<p>首先打开 开始<br />接着点击 运行<br /><a target="_blank" href="http://blog.51soump3.com/uploadfile/200807/f3ccdd27d2000e3f9255a7e3e2c4880020080722211825.jpg"><img alt="附件[ematt:32] 图1" border="0" src="http://blog.51soump3.com/uploadfile/200807/f3ccdd27d2000e3f9255a7e3e2c4880020080722211825.jpg" /></a><br />键入 cmd<br /><a target="_blank" href="http://blog.51soump3.com/uploadfile/200807/156005c5baf40ff51a327f1c34f2975b20080722211825.jpg"><img alt="附件[ematt:33] 图2" border="0" src="http://blog.51soump3.com/uploadfile/200807/thum-156005c5baf40ff51a327f1c34f2975b20080722211825.jpg" /></a><br />在命令提示符里面输入 ipconfig /all 即可(注意/前面有个空格)<br /><a target="_blank" href="http://blog.51soump3.com/uploadfile/200807/799bad5a3b514f096e69bbc4a7896cd920080722211825.jpg"><img alt="附件[ematt:34] 图3" border="0" src="http://blog.51soump3.com/uploadfile/200807/thum-799bad5a3b514f096e69bbc4a7896cd920080722211825.jpg" /></a><br />DNS Servers 这里就是你需要的DNS地址了,第一个是首选DNS,第二个是备用DNS.<br /></p>]]></description>
	<pubDate>Tue, 22 Jul 2008 21:18:25 +0800</pubDate>
	<author>51soump3.com</author>
	<guid>http://blog.51soump3.com/?action=showlog&amp;gid=59</guid>
</item>
<item>
	<title>在上传图片前实现图片预览</title>
	<link>http://blog.51soump3.com/?action=showlog&amp;gid=58</link>
	<description><![CDATA[<div class="tit"></div>
<div class="date"></div>
<div class="cnt" id="blog_text"><span class="titlered2 f-14">解决思路</span>： <br />在上传控件浏览到文件后通过&nbsp;onpropertychange&nbsp;事件改变隐藏图片的路径，如果文件是图片格式，正常显示，否则提示格式不正确。 <br /><span class="titlered2 f-14">具体步骤</span>： <br /><br />1.先插入一个上传表单控件和一隐藏的空白图片。 <br /><br />&lt;input&nbsp;type=&quot;file&quot;&nbsp;id=&quot;upload&quot;&gt; <br />&lt;img&nbsp;id=&quot;pic&quot;&nbsp;style=&quot;display:none&quot;&gt; <br /><br />2.在上传控件的属性改变(本例中为选择文件后)，设置隐藏图片的地址为所选择的文件地址。 <br /><br />&lt;script&nbsp;for=&quot;upload&quot;&nbsp;event=&quot;onpropertychange&quot;&gt;&nbsp;&nbsp;&nbsp; <br />pic.src=this.value _fcksavedurl=&quot;this.value&quot; _fcksavedurl=&quot;this.value&quot; _fcksavedurl=&quot;this.value&quot; <br />&lt;/script&gt; <br /><br />3.在隐藏图片加载完后显示。 <br /><br />&lt;script&nbsp;for=&quot;pic&quot;&nbsp;event=&quot;onload&quot;&gt; <br />this.style.display=&quot;&quot;&nbsp;&nbsp;&nbsp;&nbsp;//以行内元素方式显示隐藏的图片 <br />&lt;/script&gt; <br /><br />4.如果所选择文件不是图片格式或者路径不正确，触发onerror事件，隐藏图片并弹出警告框。 <br /><br />&lt;script&nbsp;for=&quot;pic&quot;&nbsp;event=&quot;onerror&quot;&gt;&nbsp; <br />//当&nbsp;id&nbsp;为&nbsp;pic&nbsp;的对象在装载过程中发生错误时触发此段代码 <br />this.style.display=&quot;none&quot;&nbsp;&nbsp;&nbsp;//隐藏图片 <br />alert(&quot;所选文件并非图片，请重新选择&quot;) <br />&lt;/script&gt; <br /><br />5.完整代码。 <br /><br />&lt;script&nbsp;for=&quot;upload&quot;&nbsp;event=&quot;onpropertychange&quot;&gt;&nbsp;&nbsp;&nbsp; <br />//当&nbsp;id&nbsp;为&nbsp;upload&nbsp;的对象上的属性发生变化时调用此段代码 <br />//设置隐藏图片的地址为上传控件框的值 <br />pic.src=this.value <br />&lt;/script&gt; <br />&lt;script&nbsp;for=&quot;pic&quot;&nbsp;event=&quot;onload&quot;&gt; <br />//当&nbsp;id&nbsp;为&nbsp;pic&nbsp;的对象在装载完成时触发此段代码 <br />this.style.display=&quot;&quot;&nbsp;&nbsp;&nbsp;&nbsp;//以行内元素方式显示隐藏的图片 <br />&lt;/script&gt; <br />&lt;script&nbsp;for=&quot;pic&quot;&nbsp;event=&quot;onerror&quot;&gt;&nbsp; <br />//当&nbsp;id&nbsp;为&nbsp;pic&nbsp;的对象在装载过程中发生错误时触发此段代码 <br />this.style.display=&quot;none&quot;&nbsp;&nbsp;&nbsp;//隐藏图片 <br />alert(&quot;所选文件并非图片，请重新选择&quot;) <br />&lt;/script&gt; <br />&lt;input&nbsp;type=&quot;file&quot;&nbsp;id=&quot;upload&quot;&gt; <br />&lt;img&nbsp;id=&quot;pic&quot;&nbsp;style=&quot;display:none&quot;&gt; <br /><br />技巧：显示对象除了设置display为空，还可以设为&nbsp;inline&nbsp;和&nbsp;block <br /><br /><span class="titlered2">特别提示</span> <br />代码运行后，单击上传控件的&rdquo;浏览&rdquo;按钮选择文件后，如果所选择文件为图片格式，则在右(下)方显示所选图片，否则弹出警告框。效果分别如图&nbsp;3.34&nbsp;和图3.35&nbsp;所示。 <br /><a target="_blank" href="http://blog.51soump3.com/uploadfile/200807/f3ccdd27d2000e3f9255a7e3e2c4880020080719132003.jpg"><img alt="附件[ematt:30] 图1" border="0" src="http://blog.51soump3.com/uploadfile/200807/f3ccdd27d2000e3f9255a7e3e2c4880020080719132003.jpg" /></a><br />图&nbsp;3.34&nbsp;选择正确的图片文件后显示图片预览 <br /><a target="_blank" href="http://blog.51soump3.com/uploadfile/200807/156005c5baf40ff51a327f1c34f2975b20080719132003.jpg"><img alt="附件[ematt:31] 图2" border="0" src="http://blog.51soump3.com/uploadfile/200807/156005c5baf40ff51a327f1c34f2975b20080719132003.jpg" /></a><br />图&nbsp;3.35&nbsp;选择Flash&nbsp;文件后弹出的警告框 <br />
<h4>特别说明</h4>
<br />本例通过用&nbsp;onpropertychange&nbsp;捕获对象的属性变化事件，onload&nbsp;捕获图片加载&nbsp;完成后的事件，onerror&nbsp;捕获图片加载时的出错事件，并通过script标签的for和event属性绑定到对象，而实现的上传图片预览效果。 <br />1.&nbsp;onpropertychange&nbsp;当在对象上发生对象上发生属性更改时触发 <br />2.&nbsp;onload&nbsp;在浏览器完成对象的装载后立即触发。 <br />3.&nbsp;onerror&nbsp;当对象装载过程中发生错误时触发。 <br />4.&nbsp;event&nbsp;设置或获取脚本编写用于的事件。 <br />5.&nbsp;for&nbsp;设置绑定到事件脚本的对象,在获取脚本所绑定到的对象是用&nbsp;htmlFor&nbsp;。</div>]]></description>
	<pubDate>Sat, 19 Jul 2008 13:20:03 +0800</pubDate>
	<author>51soump3.com</author>
	<guid>http://blog.51soump3.com/?action=showlog&amp;gid=58</guid>
</item>
<item>
	<title>DW CS3 spry注册表单应用实例</title>
	<link>http://blog.51soump3.com/?action=showlog&amp;gid=57</link>
	<description><![CDATA[<p>准备动手制作注册页面，为了使页面更容易操作，打算用spry来完成，其中密码验证部分没有找到方法，DW CS3自带的验证有文本域验证、选择验证、复选框验证、文本区域验证。浪费了不少时间，在ADOBE上看到一些方法，制作了下面的例子，这几天内完成注册页面工作。<br />方法：其他的部分用文本域验证就可以了，密码验证部分需要头部引用2个文件，SpryValidationConfirm.js和SpryValidationConfirm.css，然后修改密码验证文本框的span，可以参考下面的例子，最后的script内加入一行：<br />var sprytextfield4 = new Spry.Widget.ValidationConfirm(&quot;sprytextfield4&quot;, &quot;sprytextfield2&quot;, {validateOn: ['change']}); <br />其中sprytextfield4 为验证文本，sprytextfield2为密码文本。<br /><br />运行效果：<br /><img alt="附件[ematt:29] demo" border="0" src="http://blog.51soump3.com/uploadfile/200807/bee5f7a1de68d3f32a40956cdb90772520080705222507.jpg" /><br />例子：<br />
<table style="WIDTH: 575px; HEIGHT: 1139px" cellspacing="0" cellpadding="0" width="575" summary="" border="0">
    <tbody>
        <tr>
            <td>&lt;%@LANGUAGE=&quot;VBSCRIPT&quot; CODEPAGE=&quot;936&quot;%&gt;<br />&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;<br />&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;<br />&lt;head&gt;<br />&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=gb2312&quot; /&gt;<br />&lt;title&gt;注册表单密码验证的例子-13ms.net-Kinghill&lt;/title&gt;<br />&lt;script src=&quot;http://www.13ms.net/SpryAssets/SpryValidationTextField.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;<br />&lt;script src=&quot;http://www.13ms.net/SpryAssets/SpryValidationConfirm.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;<br />&lt;link href=&quot;http://www.13ms.net/SpryAssets/SpryValidationTextField.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;<br />&lt;link href=&quot;http://www.13ms.net/SpryAssets/SpryValidationConfirm.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
            <p>&nbsp;</p>
            <p>&lt;/head&gt;</p>
            <p>&lt;body&gt;<br />&lt;form id=&quot;form1&quot; name=&quot;form1&quot; method=&quot;post&quot; action=&quot;&quot;&gt;<br />&nbsp; &lt;table width=&quot;69%&quot; border=&quot;0&quot; align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;<br />&nbsp;&nbsp;&nbsp; &lt;tr&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td width=&quot;18%&quot;&gt;&lt;div align=&quot;right&quot;&gt;用户名：&lt;/div&gt;&lt;/td&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td width=&quot;82%&quot;&gt;&lt;span id=&quot;sprytextfield1&quot;&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;label&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;input type=&quot;text&quot; name=&quot;username&quot; id=&quot;username&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/label&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;span class=&quot;textfieldRequiredMsg&quot;&gt;请输入用户名。&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;<br />&nbsp;&nbsp;&nbsp; &lt;/tr&gt;<br />&nbsp;&nbsp;&nbsp; &lt;tr&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td&gt;&lt;div align=&quot;right&quot;&gt;密码：&lt;/div&gt;&lt;/td&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td&gt;&lt;span id=&quot;sprytextfield2&quot;&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;label&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;input type=&quot;text&quot; name=&quot;password&quot; id=&quot;password&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/label&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;span class=&quot;textfieldRequiredMsg&quot;&gt;请输入密码。&lt;/span&gt;&lt;span class=&quot;textfieldMinCharsMsg&quot;&gt;密码长度至少要超过6位。&lt;/span&gt;&lt;span class=&quot;textfieldMaxCharsMsg&quot;&gt;不能超过12位以上密码。&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;<br />&nbsp;&nbsp;&nbsp; &lt;/tr&gt;<br />&nbsp;&nbsp;&nbsp; &lt;tr&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td&gt;&lt;div align=&quot;right&quot;&gt;校验密码&lt;/div&gt;&lt;/td&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td&gt;&lt;span id=&quot;sprytextfield4&quot;&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;label&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;input type=&quot;text&quot; name=&quot;vpassword&quot; id=&quot;vpassword&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/label&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;span class=&quot;textfieldRequiredMsg&quot;&gt;请输入校验密码。&lt;/span&gt;&lt;span class=confirmrequiredmsg&gt;必须输入校验密码&lt;/span&gt; &lt;span class=confirminvalidmsg&gt;密码校验不一致&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/td&gt;<br />&nbsp;&nbsp;&nbsp; &lt;/tr&gt;<br />&nbsp;&nbsp;&nbsp; &lt;tr&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td&gt;&lt;div align=&quot;right&quot;&gt;电子邮件&lt;/div&gt;&lt;/td&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td&gt;&lt;span id=&quot;sprytextfield3&quot;&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;label&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;input type=&quot;text&quot; name=&quot;mail&quot; id=&quot;mail&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/label&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;span class=&quot;textfieldRequiredMsg&quot;&gt;必须输入邮件地址。&lt;/span&gt;&lt;span class=&quot;textfieldInvalidFormatMsg&quot;&gt;邮件格式无效。&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;<br />&nbsp;&nbsp;&nbsp; &lt;/tr&gt;<br />&nbsp;&nbsp;&nbsp; &lt;tr&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td height=&quot;27&quot;&gt;&lt;div align=&quot;right&quot;&gt;&lt;/div&gt;&lt;/td&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td&gt;&lt;label&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;input type=&quot;submit&quot; name=&quot;button&quot; id=&quot;button&quot; value=&quot;注册&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/label&gt;&lt;/td&gt;<br />&nbsp;&nbsp;&nbsp; &lt;/tr&gt;<br />&nbsp; &lt;/table&gt;<br />&lt;/form&gt;<br />&lt;script type=&quot;text/javascript&quot;&gt;<br />&lt;!--<br />var sprytextfield1 = new Spry.Widget.ValidationTextField(&quot;sprytextfield1&quot;);<br />var sprytextfield2 = new Spry.Widget.ValidationTextField(&quot;sprytextfield2&quot;, &quot;none&quot;, {minChars:6, maxChars:12});<br />var sprytextfield3 = new Spry.Widget.ValidationTextField(&quot;sprytextfield3&quot;, &quot;email&quot;);<br />var sprytextfield4 = new Spry.Widget.ValidationConfirm(&quot;sprytextfield4&quot;, &quot;sprytextfield2&quot;, {validateOn: ['change']});<br />//--&gt;<br />&lt;/script&gt;<br />&lt;/body&gt;<br />&lt;/html&gt;<br /></p>
            </td>
        </tr>
    </tbody>
</table>
</p>
使用时下载两个文件(js/css):<br />http://www.13ms.net/SpryAssets/SpryValidationConfirm.js<br />http://www.13ms.net/SpryAssets/SpryValidationConfirm.css]]></description>
	<pubDate>Sat, 05 Jul 2008 22:16:43 +0800</pubDate>
	<author>51soump3.com</author>
	<guid>http://blog.51soump3.com/?action=showlog&amp;gid=57</guid>
</item>
<item>
	<title>你可能不清楚的20个windowsXP小秘密</title>
	<link>http://blog.51soump3.com/?action=showlog&amp;gid=56</link>
	<description><![CDATA[<p>1. systeminfo：让XP列出更多有用信息</p>
<p>Windows XP 总是在炫耀它可以给稳定工作多么长的时间！要想详细地了解这一信息，你可以接入 Windows的&ldquo;开始菜单&rdquo;，再开启&ldquo;附件菜单&rdquo;中的&ldquo;命令提示符&rdquo;，然后在其中输入&ldquo;systeminfo&rdquo;这个命令。电脑就会给你显示出许多有用信息，其中包括了这个系统的初次安装时间，以及本次持续运行的时间。假如你想要保留这些信息，你可以输入&ldquo;systeminfo &gt;info.txt&rdquo;，这将会创建一个名为&ldquo;info.txt&rdquo;文本文件，你可以稍后用Windows的记事本将其打开，进行查看。（仅限于 Windows XP 专业版本）</p>
<p>2.gpedit.msc：设置直接删除文件</p>
<p>你可以将 Windows XP操作系统设置为直接删除文件，而不用先将这些文件转移到回收站当中。进入开始菜单，选择&ldquo;运行&hellip;&hellip;&rdquo;，输入&ldquo;gpedit.msc&rdquo;；在弹出的对话框中，选择用户设置，管理模板，Windows 组件，Windows Explorer，找到&ldquo;不要将删除的文件移送到回收站&rdquo;的选项。开启这个选项。</p>
<p>编辑认为在回收站的属性里选择更快一些。</p>
<p>通过调整 gpedit 对话框中的相关设置，你可以对系统的运行方式和选项做出很多调整，但是请一定小心----你所作出的某些改变可能会系统运行出现问题，或造成系统的不稳定。（仅限于 Windows XP 专业版本）</p>
<p>3. rundll32.exe：用鼠标锁定计算机</p>
<p>你可以轻轻点击两下鼠标，就锁定自己的 Windows XP 系统。请先在桌面上点击鼠标右键，创建一个新的快捷方式，然后再填写项目位置的时候， 输入&ldquo;rundll32.exe user32.dll,LockWorkStation&rdquo;。</p>
<p>然后再给这个快捷方式取一个你喜欢的名字，比如&ldquo;锁定计算机&rdquo;。就是这么简单----现在，你只需要用鼠标双击这个快捷方式，你的电脑就会马上被锁定。如果你觉得这还不够简单的话，同时按住键盘上的&ldquo;Windows 键（有XP图标的那个）&rdquo;和&ldquo;L&rdquo;键，将会有同样的效果。</p>
<p>4. sysoc.inf：把隐藏的文件揪出来</p>
<p>Windows XP 隐藏了一些你可能想要删除或卸载的系统软件，诸如 WindowsMessenger，但是你可以让这些软件重新显示出来。使用 Windows自带的记事本或写字板程序，编辑文本文件&ldquo;/windows/inf/sysoc.inf&rdquo;，搜索并删除掉关键词&ldquo;hide&rdquo;。然后你再进入&ldquo;控制面板&rdquo;的&ldquo;添加/删除程序&rdquo;，选择&ldquo;添加或删除 Windows 组件&rdquo;。你可以发现所有的系统软件都被显示出来了，现在就可以卸载它们了。</p>
<p>5. /？：命令行的诱惑</p>
<p>对于那些擅长于操作DOS批处理命令的用户来说，Windows XP也为他们提供了许多有趣的新命令。其中包括用来创建和监视系统事件的&ldquo;eventcreate&rdquo;和&ldquo;eventtriggers&rdquo;命令，用来监控各种子系统的运行状态的&ldquo;typeperf'&rdquo;，以及用来操作计划任务的&ldquo;schtasks&rdquo;。</p>
<p>和以前一样，输入某个命令，并紧跟其后加上&ldquo;/?&rdquo;的后缀，将会为你提供一系列与这个命令相关的选项。</p>
<p>6. ipv6 install：XP也能玩IPv6</p>
<p>Windows XP 能够支持 IPv6 ----下一代互联网的IP协议。但是非常不幸的是，这一功能超出了你的网络提供商（ISP）所能支持的服务，所以你只能在自己的局域网中实验这一功能。请在 &ldquo;运行&hellip;&hellip;&rdquo;中输入命令&ldquo;ipv6 install'&rdquo;（请不要担心，这个命令不会破坏你现有的网络设定），然后再在命令提示符中输入&ldquo;ipv6/?&rdquo;，你可以获得更多的相关信息。假如你根本不知道 IPv6 是什么的话，那么就请忽略掉这一段话。</p>
<p>7.tskill：试试用命令来终止任务</p>
<p>你可以最终通过在命令提示符中输入命令&ldquo;taskkill/pid&rdquo;和任务序号，或者仅仅输入&ldquo;tskill&rdquo;以及进程的序号，来终止掉某个任务。想要找出所有正在运行中的任务及其序号？请输入&ldquo;tasklist&rdquo;，这个命令也可以帮助你了解到更多当前系统运行状态的信息。</p>
<p>8. 快慢自选：浏览ZIP压缩包</p>
<p>Windows XP会像对待普通文件夹一样对待ZIP压缩文件包，这一功能在运行速度较快的机器上非常的方便，但是在运行速度较慢的机器上却会拖累系统的整体运行效率。如果你电脑的配置并不是很高，你可以通过在命令提示符中输入命令&ldquo;regsvr32 /u zipfldr.dll&rdquo;来关闭这一功能 ，让 WindowsXP 把压缩文件包丢在一边。假如你稍候改变了自己的主意，你可以通过输入&ldquo;regsvr32 zipfldr.dll&rdquo;来恢复这一功能。</p>
<p>9. ClearType：保护你的心灵之窗</p>
<p>Windows XP 系统支持&ldquo;ClearType&rdquo;---- 微软公司的反锯齿字体显示技术 ----但是在默认设置下，这一显示效果并没有被打开。该项功能非常值得尝试，尤其是在你使用电脑多年，糟糕的电脑屏幕已经使你的双眼变得无比疲惫，视力开始急剧下降的时候。为了开启这个效果，请用鼠标右键点击电脑桌面，在弹出