﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>IT博客网-asfman-文章分类-asp(javascrpt)</title><link>http://www.cnitblog.com/asfman/category/2476.html</link><description>有些人注定要生活在彼岸 可以亲近可以爱怜 甚至可以穷尽一生去思念 只是无法触及 有些距离 注定不能跨越 只能俩俩相望 就像有些爱只能养在心里 长在眼中 不要捧在手里 放在身边 注定只能邂逅 无法遭遇</description><language>zh-cn</language><lastBuildDate>Tue, 18 Mar 2008 15:13:35 GMT</lastBuildDate><pubDate>Tue, 18 Mar 2008 15:13:35 GMT</pubDate><ttl>60</ttl><item><title>编码的原理　　BASE64</title><link>http://www.cnitblog.com/asfman/articles/41133.html</link><dc:creator>汪杰</dc:creator><author>汪杰</author><pubDate>Tue, 18 Mar 2008 14:35:00 GMT</pubDate><guid>http://www.cnitblog.com/asfman/articles/41133.html</guid><wfw:comment>http://www.cnitblog.com/asfman/comments/41133.html</wfw:comment><comments>http://www.cnitblog.com/asfman/articles/41133.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/asfman/comments/commentRss/41133.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/asfman/services/trackbacks/41133.html</trackback:ping><description><![CDATA[<div><span style="FONT-SIZE: 14pt"><strong style="COLOR: black; BACKGROUND-COLOR: #ffff66">BASE64</strong></span><span style="FONT-SIZE: 14pt">编码</span><span style="FONT-SIZE: 14pt">的<strong style="COLOR: black; BACKGROUND-COLOR: #99ff99">原理</strong>很简单，其方法是，将输入数据流每次取</span><span style="FONT-SIZE: 14pt">6 bit</span><span style="FONT-SIZE: 14pt">（每</span><span style="FONT-SIZE: 14pt">bit</span><span style="FONT-SIZE: 14pt">代表</span><span style="FONT-SIZE: 14pt">1</span><span style="FONT-SIZE: 14pt">位二进制），不足</span><span style="FONT-SIZE: 14pt">6bit</span><span style="FONT-SIZE: 14pt">的补</span><span style="FONT-SIZE: 14pt">0</span><span style="FONT-SIZE: 14pt">，这样，每</span><span style="FONT-SIZE: 14pt">3</span><span style="FONT-SIZE: 14pt">个</span><span style="FONT-SIZE: 14pt">8</span><span style="FONT-SIZE: 14pt">位字节将编码为</span><span style="FONT-SIZE: 14pt">4</span><span style="FONT-SIZE: 14pt">个</span><span style="FONT-SIZE: 14pt">6</span><span style="FONT-SIZE: 14pt">位字节（</span><span style="FONT-SIZE: 14pt">3&#215;8 &#8594; 4&#215;6</span><span style="FONT-SIZE: 14pt">）；不满</span><span style="FONT-SIZE: 14pt">4</span><span style="FONT-SIZE: 14pt">个字节的以</span><span style="FONT-SIZE: 14pt">&#8220;=&#8221;</span><span style="FONT-SIZE: 14pt">填充。其实这</span><span style="FONT-SIZE: 14pt">4</span><span style="FONT-SIZE: 14pt">个六位字节</span><span style="FONT-SIZE: 14pt">仍然是</span><span style="FONT-SIZE: 14pt">8</span><span style="FONT-SIZE: 14pt">位，只不过高两位被设置为</span><span style="FONT-SIZE: 14pt">0</span><span style="FONT-SIZE: 14pt">。当一个字节只有</span><span style="FONT-SIZE: 14pt">6</span><span style="FONT-SIZE: 14pt">位有效时，它的取值空间为</span><span style="FONT-SIZE: 14pt">0 </span><span style="FONT-SIZE: 14pt">到</span><span style="FONT-SIZE: 14pt"> 2</span><span style="FONT-SIZE: 14pt">的</span><span style="FONT-SIZE: 14pt">6</span><span style="FONT-SIZE: 14pt">次方减</span><span style="FONT-SIZE: 14pt">1 </span><span style="FONT-SIZE: 14pt">即</span><span style="FONT-SIZE: 14pt">63</span><span style="FONT-SIZE: 14pt">，也就是说被转换的</span><span style="FONT-SIZE: 14pt"><strong style="COLOR: black; BACKGROUND-COLOR: #ffff66">Base64</strong></span><span style="FONT-SIZE: 14pt">编码的每一个编码的取值空间为（</span><span style="FONT-SIZE: 14pt">0~63</span><span style="FONT-SIZE: 14pt">）。事实上，</span><span style="FONT-SIZE: 14pt">0~63</span><span style="FONT-SIZE: 14pt">之间的</span><span style="FONT-SIZE: 14pt">ASCII</span><span style="FONT-SIZE: 14pt">码有许多不可见字符，所以应该再做一个映射，映射表（码表）为</span></div>
<div><span style="FONT-SIZE: 14pt; COLOR: black">Table 1: The <strong style="COLOR: black; BACKGROUND-COLOR: #ffff66">Base64</strong> Alphabet <br>Value Encoding Value Encoding Value Encoding Value Encoding <br>0 A 17 R 34 i 51 z <br>1 B 18 S 35 j 52 0 <br>2 C 19 T 36 k 53 1 <br>3 D 20 U 37 l 54 2 <br>4 E 21 V 38 m 55 3 <br>5 F 22 W 39 n 56 4 <br>6 G 23 X 40 o 57 5 <br>7 H 24 Y 41 p 58 6 <br>8 I 25 Z 42 q 59 7 <br>9 J 26 a 43 r 60 8 <br>10 K 27 b 44 s 61 9 <br>11 L 28 c 45 t 62 + <br>12 M 29 d 46 u 63 / <br>13 N 30 e 47 v (pad) = <br>14 O 31 f 48 w <br>15 P 32 g 49 x <br>16 Q 33 h 50 y</span></div>
<div><font size=3>&nbsp;</font><span style="FONT-SIZE: 14pt">这样就可以将</span><span style="FONT-SIZE: 14pt">3</span><span style="FONT-SIZE: 14pt">个</span><span style="FONT-SIZE: 14pt">8</span><span style="FONT-SIZE: 14pt">位字节，转换为</span><span style="FONT-SIZE: 14pt">4</span><span style="FONT-SIZE: 14pt">个可见字符。</span><span style="FONT-SIZE: 14pt">也就是说，转换后的字符串要比原来的长</span><span style="FONT-SIZE: 14pt">1/3</span><span style="FONT-SIZE: 14pt">，扩张率为</span><span style="FONT-SIZE: 14pt">3:4</span><span style="FONT-SIZE: 14pt">。</span><span style="FONT-SIZE: 14pt">举例说明：　　</span><span style="FONT-SIZE: 14pt">1</span><span style="FONT-SIZE: 14pt">、当字符串字符个数为</span><span style="FONT-SIZE: 14pt">3</span><span style="FONT-SIZE: 14pt">的倍数时；比如字符串</span><span style="FONT-SIZE: 14pt">&#8220;ABC&#8221;</span><span style="FONT-SIZE: 14pt">，其在计算机内存中的十六进制表示为</span><span style="FONT-SIZE: 14pt">$41</span><span style="FONT-SIZE: 14pt">、</span><span style="FONT-SIZE: 14pt">$42</span><span style="FONT-SIZE: 14pt">、</span><span style="FONT-SIZE: 14pt">$43</span><span style="FONT-SIZE: 14pt">，十进制表示为</span><span style="FONT-SIZE: 14pt">&#8220;65&#8221;&#8220;66&#8221;&#8220;67&#8221;</span><span style="FONT-SIZE: 14pt">；二进制表示为</span><span style="FONT-SIZE: 14pt">01000001</span><span style="FONT-SIZE: 14pt">　　</span><span style="FONT-SIZE: 14pt">01000010</span><span style="FONT-SIZE: 14pt">　　</span><span style="FONT-SIZE: 14pt">01000011</span><span style="FONT-SIZE: 14pt">　　</span><span style="FONT-SIZE: 14pt">&nbsp;</span><span style="FONT-SIZE: 14pt">将这三个二进制数依次取</span><span style="FONT-SIZE: 14pt">6bit</span><span style="FONT-SIZE: 14pt">，　　</span><span style="FONT-SIZE: 14pt">010000/01</span><span style="FONT-SIZE: 14pt">　　</span><span style="FONT-SIZE: 14pt">0100/0010</span><span style="FONT-SIZE: 14pt">　　</span><span style="FONT-SIZE: 14pt">01/000011</span><span style="FONT-SIZE: 14pt">　　就转换成了：　　</span><span style="FONT-SIZE: 14pt">010000</span><span style="FONT-SIZE: 14pt">　　</span><span style="FONT-SIZE: 14pt">010100</span><span style="FONT-SIZE: 14pt">　　</span><span style="FONT-SIZE: 14pt">001001</span><span style="FONT-SIZE: 14pt">　　</span><span style="FONT-SIZE: 14pt">000011</span><span style="FONT-SIZE: 14pt">　　将这四个二进制数转换成十六制数为：</span><span style="FONT-SIZE: 14pt">$10</span><span style="FONT-SIZE: 14pt">，</span><span style="FONT-SIZE: 14pt">$14</span><span style="FONT-SIZE: 14pt">，</span><span style="FONT-SIZE: 14pt">$9</span><span style="FONT-SIZE: 14pt">，</span><span style="FONT-SIZE: 14pt">$3</span><span style="FONT-SIZE: 14pt">，十进制数位为</span><span style="FONT-SIZE: 14pt">16</span><span style="FONT-SIZE: 14pt">，</span><span style="FONT-SIZE: 14pt">20</span><span style="FONT-SIZE: 14pt">，</span><span style="FONT-SIZE: 14pt">9</span><span style="FONT-SIZE: 14pt">，</span><span style="FONT-SIZE: 14pt">3</span><span style="FONT-SIZE: 14pt">。对照上面的码表，分别查找出对应的字符为</span><span style="FONT-SIZE: 14pt">Q</span><span style="FONT-SIZE: 14pt">，</span><span style="FONT-SIZE: 14pt">U</span><span style="FONT-SIZE: 14pt">，</span><span style="FONT-SIZE: 14pt">J</span><span style="FONT-SIZE: 14pt">，</span><span style="FONT-SIZE: 14pt">D</span><span style="FONT-SIZE: 14pt">。也是就说字符串</span><span style="FONT-SIZE: 14pt">&#8220;ABC&#8221;</span><span style="FONT-SIZE: 14pt">经过</span><span style="FONT-SIZE: 14pt"><strong style="COLOR: black; BACKGROUND-COLOR: #ffff66">BASE64</strong></span><span style="FONT-SIZE: 14pt">编码后得出</span><span style="FONT-SIZE: 14pt">&#8220;QUJD&#8221;</span><span style="FONT-SIZE: 14pt">。　　这是最简单的情况，即</span><span style="FONT-SIZE: 14pt">ASCII</span><span style="FONT-SIZE: 14pt">码字符数刚好可以被</span><span style="FONT-SIZE: 14pt">3</span><span style="FONT-SIZE: 14pt">整除。接着继续讨论余数为</span><span style="FONT-SIZE: 14pt">2</span><span style="FONT-SIZE: 14pt">、为</span><span style="FONT-SIZE: 14pt">1</span><span style="FONT-SIZE: 14pt">的情况。　　</span><span style="FONT-SIZE: 14pt">2</span><span style="FONT-SIZE: 14pt">、当余数为</span><span style="FONT-SIZE: 14pt">2</span><span style="FONT-SIZE: 14pt">时，比如字符串</span><span style="FONT-SIZE: 14pt">&#8220;ce&#8221;</span><span style="FONT-SIZE: 14pt">，其在内存中十六进制表示为</span><span style="FONT-SIZE: 14pt">$63</span><span style="FONT-SIZE: 14pt">，</span><span style="FONT-SIZE: 14pt">$65</span><span style="FONT-SIZE: 14pt">；十进制表示表示</span><span style="FONT-SIZE: 14pt">99</span><span style="FONT-SIZE: 14pt">，</span><span style="FONT-SIZE: 14pt">101</span><span style="FONT-SIZE: 14pt">；二进制表示为　　</span><span style="FONT-SIZE: 14pt">01100011</span><span style="FONT-SIZE: 14pt">　</span><span style="FONT-SIZE: 14pt">01100101</span><span style="FONT-SIZE: 14pt">　依次取</span><span style="FONT-SIZE: 14pt">6bit</span><span style="FONT-SIZE: 14pt">　</span><span style="FONT-SIZE: 14pt">011000/11</span><span style="FONT-SIZE: 14pt">　</span><span style="FONT-SIZE: 14pt">0110/0101</span><span style="FONT-SIZE: 14pt">　　这时，第</span><span style="FONT-SIZE: 14pt">3</span><span style="FONT-SIZE: 14pt">个字符不足</span><span style="FONT-SIZE: 14pt">6</span><span style="FONT-SIZE: 14pt">位，在后面补零，也就是</span><span style="FONT-SIZE: 14pt">0101</span><span style="FONT-SIZE: 14pt">变成</span><span style="FONT-SIZE: 14pt">010100</span><span style="FONT-SIZE: 14pt">。转换结果为　　</span><span style="FONT-SIZE: 14pt">011000</span><span style="FONT-SIZE: 14pt">　</span><span style="FONT-SIZE: 14pt">110110</span><span style="FONT-SIZE: 14pt">　</span><span style="FONT-SIZE: 14pt">010100</span><span style="FONT-SIZE: 14pt">　　这</span><span style="FONT-SIZE: 14pt">3</span><span style="FONT-SIZE: 14pt">个二进制数转换成十六制数为</span><span style="FONT-SIZE: 14pt">$18</span><span style="FONT-SIZE: 14pt">，</span><span style="FONT-SIZE: 14pt">$36</span><span style="FONT-SIZE: 14pt">，</span><span style="FONT-SIZE: 14pt">$14</span><span style="FONT-SIZE: 14pt">；十进制数位为</span><span style="FONT-SIZE: 14pt">24</span><span style="FONT-SIZE: 14pt">，</span><span style="FONT-SIZE: 14pt">54</span><span style="FONT-SIZE: 14pt">，</span><span style="FONT-SIZE: 14pt">20</span><span style="FONT-SIZE: 14pt">。对照码表得出结果</span><span style="FONT-SIZE: 14pt">&#8220;Y2U&#8221;</span><span style="FONT-SIZE: 14pt">。编码后的字符个数不足</span><span style="FONT-SIZE: 14pt">4</span><span style="FONT-SIZE: 14pt">位，用</span><span style="FONT-SIZE: 14pt">&#8220;</span><span style="FONT-SIZE: 14pt">＝</span><span style="FONT-SIZE: 14pt">&#8221;</span><span style="FONT-SIZE: 14pt">填充，最后编码得出</span><span style="FONT-SIZE: 14pt">&#8220;Y2U=&#8221;</span><span style="FONT-SIZE: 14pt">。　　</span><span style="FONT-SIZE: 14pt">3</span><span style="FONT-SIZE: 14pt">、当余数为</span><span style="FONT-SIZE: 14pt">1</span><span style="FONT-SIZE: 14pt">时，比如字符串</span><span style="FONT-SIZE: 14pt">&#8220;{&#8221;</span><span style="FONT-SIZE: 14pt">，其在内存中的十六进制表示为</span><span style="FONT-SIZE: 14pt">$7B</span><span style="FONT-SIZE: 14pt">，十进制为</span><span style="FONT-SIZE: 14pt">123</span><span style="FONT-SIZE: 14pt">，二进制位表示为　　</span><span style="FONT-SIZE: 14pt">01111011</span><span style="FONT-SIZE: 14pt">　依次取</span><span style="FONT-SIZE: 14pt">6bit</span><span style="FONT-SIZE: 14pt">　</span><span style="FONT-SIZE: 14pt">011110/11</span><span style="FONT-SIZE: 14pt">　　　补</span><span style="FONT-SIZE: 14pt">0</span><span style="FONT-SIZE: 14pt">后为　</span><span style="FONT-SIZE: 14pt">011110/110000</span><span style="FONT-SIZE: 14pt">　　转换结果为</span><span style="FONT-SIZE: 14pt">011110</span><span style="FONT-SIZE: 14pt">和</span><span style="FONT-SIZE: 14pt">110000</span><span style="FONT-SIZE: 14pt">　　这两个二进制数转换成十六进制数为</span><span style="FONT-SIZE: 14pt">$1E</span><span style="FONT-SIZE: 14pt">，</span><span style="FONT-SIZE: 14pt">$30</span><span style="FONT-SIZE: 14pt">，十进制数为</span><span style="FONT-SIZE: 14pt">30</span><span style="FONT-SIZE: 14pt">，</span><span style="FONT-SIZE: 14pt">48</span><span style="FONT-SIZE: 14pt">。对照码表得出结果为</span><span style="FONT-SIZE: 14pt">&#8220;ew&#8221;</span><span style="FONT-SIZE: 14pt">，补上</span><span style="FONT-SIZE: 14pt">&#8220;</span><span style="FONT-SIZE: 14pt">＝</span><span style="FONT-SIZE: 14pt">&#8221;</span><span style="FONT-SIZE: 14pt">，最后编码得出</span><span style="FONT-SIZE: 14pt">&#8220;ew= =&#8221;</span><span style="FONT-SIZE: 14pt">。　　解码也很简单，是编码的逆过程，即将每个字符对照码表换算成</span><span style="FONT-SIZE: 14pt">6bit</span><span style="FONT-SIZE: 14pt">的二进制数，然后重组起来，按</span><span style="FONT-SIZE: 14pt">8</span><span style="FONT-SIZE: 14pt">位进行截取，得出原码。</span></div>
<div><span style="FONT-SIZE: 14pt">二、</span><span style="FONT-SIZE: 14pt"><strong style="COLOR: black; BACKGROUND-COLOR: #ffff66">BASE64</strong></span><span style="FONT-SIZE: 14pt">编码的实现方法　　</span><span style="FONT-SIZE: 14pt"><strong style="COLOR: black; BACKGROUND-COLOR: #ffff66">BASE64</strong></span><span style="FONT-SIZE: 14pt">编码的实现方法很多，但大多基于二进制数的移位、与或操作，不便于理解。为此，本人经过摸索，想出了一种基于十进制下的易于掌握的编码方法。根据上述<strong style="COLOR: black; BACKGROUND-COLOR: #99ff99">原理</strong>，每</span><span style="FONT-SIZE: 14pt">3</span><span style="FONT-SIZE: 14pt">个字节将转换成４个字节，也就是说每一个半字节（</span><span style="FONT-SIZE: 14pt">12bit</span><span style="FONT-SIZE: 14pt">）正好转换成</span><span style="FONT-SIZE: 14pt">2</span><span style="FONT-SIZE: 14pt">个编码后的字符（２</span><span style="FONT-SIZE: 14pt">&#215;6bit</span><span style="FONT-SIZE: 14pt">）。在十六进制下半个字节可用</span><span style="FONT-SIZE: 14pt">0~F</span><span style="FONT-SIZE: 14pt">表示。为此，依次取字符串在十六进制表示下的三位，通过整除和取余运算很容易得出编码后的</span><span style="FONT-SIZE: 14pt">2</span><span style="FONT-SIZE: 14pt">个字符。　　比如字符串</span><span style="FONT-SIZE: 14pt">ABC</span><span style="FONT-SIZE: 14pt">，其十六进制在内存中表示</span><span style="FONT-SIZE: 14pt">$414243</span><span style="FONT-SIZE: 14pt">，依次取</span><span style="FONT-SIZE: 14pt">3</span><span style="FONT-SIZE: 14pt">位，得出结果为</span><span style="FONT-SIZE: 14pt">$414</span><span style="FONT-SIZE: 14pt">和</span><span style="FONT-SIZE: 14pt">$243</span><span style="FONT-SIZE: 14pt">，转换成十进制为</span><span style="FONT-SIZE: 14pt">1044</span><span style="FONT-SIZE: 14pt">和</span><span style="FONT-SIZE: 14pt">579</span><span style="FONT-SIZE: 14pt">。将这两个数分别与</span><span style="FONT-SIZE: 14pt">64</span><span style="FONT-SIZE: 14pt">进行整除和取余运算　　</span><span style="FONT-SIZE: 14pt">1044</span><span style="FONT-SIZE: 14pt">　</span><span style="FONT-SIZE: 14pt">Div</span><span style="FONT-SIZE: 14pt">　</span><span style="FONT-SIZE: 14pt">64=16</span><span style="FONT-SIZE: 14pt">　　</span><span style="FONT-SIZE: 14pt">1044</span><span style="FONT-SIZE: 14pt">　</span><span style="FONT-SIZE: 14pt">Mod</span><span style="FONT-SIZE: 14pt">　</span><span style="FONT-SIZE: 14pt">64=20&nbsp;</span><span style="FONT-SIZE: 14pt">　　</span><span style="FONT-SIZE: 14pt"> 579</span><span style="FONT-SIZE: 14pt">　</span><span style="FONT-SIZE: 14pt">Div</span><span style="FONT-SIZE: 14pt">　</span><span style="FONT-SIZE: 14pt">64=9</span><span style="FONT-SIZE: 14pt">　　　</span><span style="FONT-SIZE: 14pt">579</span><span style="FONT-SIZE: 14pt">　</span><span style="FONT-SIZE: 14pt">Mod</span><span style="FONT-SIZE: 14pt">　</span><span style="FONT-SIZE: 14pt">64=3</span><span style="FONT-SIZE: 14pt">　　得出结果为</span><span style="FONT-SIZE: 14pt">16</span><span style="FONT-SIZE: 14pt">，</span><span style="FONT-SIZE: 14pt">20</span><span style="FONT-SIZE: 14pt">，</span><span style="FONT-SIZE: 14pt">9</span><span style="FONT-SIZE: 14pt">，</span><span style="FONT-SIZE: 14pt">3</span><span style="FONT-SIZE: 14pt">。对照上面的码表，编码结果同样为</span><span style="FONT-SIZE: 14pt">&#8220;QUJD&#8221;</span><span style="FONT-SIZE: 14pt">。　　在高级语言中，很容易将字符串的十六进制以字符串形式表达出来，然后通过依次截取</span><span style="FONT-SIZE: 14pt">3</span><span style="FONT-SIZE: 14pt">个字符转换成整数，最后进行上述运算得出结果。</span></div>
<br>
<img src ="http://www.cnitblog.com/asfman/aggbug/41133.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/asfman/" target="_blank">汪杰</a> 2008-03-18 22:35 <a href="http://www.cnitblog.com/asfman/articles/41133.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>404 and execute,transfer</title><link>http://www.cnitblog.com/asfman/articles/41091.html</link><dc:creator>汪杰</dc:creator><author>汪杰</author><pubDate>Tue, 18 Mar 2008 05:42:00 GMT</pubDate><guid>http://www.cnitblog.com/asfman/articles/41091.html</guid><wfw:comment>http://www.cnitblog.com/asfman/comments/41091.html</wfw:comment><comments>http://www.cnitblog.com/asfman/articles/41091.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/asfman/comments/commentRss/41091.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/asfman/services/trackbacks/41091.html</trackback:ping><description><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 假如我输入<a href="http://localhost/add.htm">http://localhost/add.htm</a> 这个页面不存在，那么转向404自定义页面处理，处理页面通过query_string获到的内容为：404;http://localhost/add.htm 然后可以通过分析这个字符串就行转向处理，通过Execute,transfer的asp都可以通过query_string来获得<br>这个字符串。<br>&nbsp;&nbsp;&nbsp; Execute,Transfer转向的页面不能传递、获取主页面的变量。<br>&nbsp;&nbsp;&nbsp; Eexucute执行转向那个页面，执行完后返回所有内容回主页面，然后主页面接着处理。<br>&nbsp;&nbsp;&nbsp; Transfer执行转向那个页面，执行完后返回所有内容回主页面，然后主页面停止处理后面代码。</p>
<img src ="http://www.cnitblog.com/asfman/aggbug/41091.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/asfman/" target="_blank">汪杰</a> 2008-03-18 13:42 <a href="http://www.cnitblog.com/asfman/articles/41091.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>关于mdb里的乱码</title><link>http://www.cnitblog.com/asfman/articles/37801.html</link><dc:creator>汪杰</dc:creator><author>汪杰</author><pubDate>Mon, 17 Dec 2007 11:30:00 GMT</pubDate><guid>http://www.cnitblog.com/asfman/articles/37801.html</guid><wfw:comment>http://www.cnitblog.com/asfman/comments/37801.html</wfw:comment><comments>http://www.cnitblog.com/asfman/articles/37801.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/asfman/comments/commentRss/37801.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/asfman/services/trackbacks/37801.html</trackback:ping><description><![CDATA[<p>只要mdb字段打开是正常字符，那么无论用什么编码读取都会正常，除非codepage设置与meta，和charset</p>
设置不一置 。<br>乱码情况：<br>当一个页面以utf8显示，发送字符到后台asp文件，而后台asp文件是gb2312编码，这时读取到的字符为乱码，存入数据库，数据库显示也乱码。<br>当我们设置读取页面的codepage为gb2312，然后设置meta和charset为utf-8会显示正常
<img src ="http://www.cnitblog.com/asfman/aggbug/37801.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/asfman/" target="_blank">汪杰</a> 2007-12-17 19:30 <a href="http://www.cnitblog.com/asfman/articles/37801.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>向游览器输出excel</title><link>http://www.cnitblog.com/asfman/articles/36393.html</link><dc:creator>汪杰</dc:creator><author>汪杰</author><pubDate>Sat, 17 Nov 2007 00:54:00 GMT</pubDate><guid>http://www.cnitblog.com/asfman/articles/36393.html</guid><wfw:comment>http://www.cnitblog.com/asfman/comments/36393.html</wfw:comment><comments>http://www.cnitblog.com/asfman/articles/36393.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/asfman/comments/commentRss/36393.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/asfman/services/trackbacks/36393.html</trackback:ping><description><![CDATA[以下步骤说明了如何使用此方法向浏览器写入一个 Excel 文件：
<table class="list ol">
    <tbody>
        <tr>
            <td class=number>1.</td>
            <td class=text>创建一个新的 ASP 页并粘贴以下代码：<code>
            <pre class=code>&lt;%
            'Set the content type to the specific type that you are sending.
            Response.ContentType = "application/x-msexcel"
            Const adTypeBinary = 1
            Dim strFilePath
            strFilePath = "C:\ExcelFiles\Excel1.xls" 'This is the path to the file on disk.
            Set objStream = Server.CreateObject("ADODB.Stream")
            objStream.Open
            objStream.Type = adTypeBinary
            objStream.LoadFromFile strFilePath
            Response.BinaryWrite objStream.Read
            objStream.Close
            Set objStream = Nothing
            %&gt;
            </pre>
            </code></td>
        </tr>
        <tr>
            <td class=number>2.</td>
            <td class=text>将该文件保存到 Web 服务器。</td>
        </tr>
        <tr>
            <td class=number>3.</td>
            <td class=text>在浏览器中，浏览到该文件。</td>
        </tr>
    </tbody>
</table>
<img src ="http://www.cnitblog.com/asfman/aggbug/36393.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/asfman/" target="_blank">汪杰</a> 2007-11-17 08:54 <a href="http://www.cnitblog.com/asfman/articles/36393.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>about stream read bytes</title><link>http://www.cnitblog.com/asfman/articles/36392.html</link><dc:creator>汪杰</dc:creator><author>汪杰</author><pubDate>Fri, 16 Nov 2007 16:17:00 GMT</pubDate><guid>http://www.cnitblog.com/asfman/articles/36392.html</guid><wfw:comment>http://www.cnitblog.com/asfman/comments/36392.html</wfw:comment><comments>http://www.cnitblog.com/asfman/articles/36392.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/asfman/comments/commentRss/36392.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/asfman/services/trackbacks/36392.html</trackback:ping><description><![CDATA[&nbsp;stream&nbsp;object only can&nbsp;write original bytes data,using midb intercepts bytes data cannot use<br>eg:<br>pData = Midb(sData,1,100)<br>pData cannot use width Stream' Write method
<img src ="http://www.cnitblog.com/asfman/aggbug/36392.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/asfman/" target="_blank">汪杰</a> 2007-11-17 00:17 <a href="http://www.cnitblog.com/asfman/articles/36392.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>创建数据库表组件</title><link>http://www.cnitblog.com/asfman/articles/36275.html</link><dc:creator>汪杰</dc:creator><author>汪杰</author><pubDate>Wed, 14 Nov 2007 08:44:00 GMT</pubDate><guid>http://www.cnitblog.com/asfman/articles/36275.html</guid><wfw:comment>http://www.cnitblog.com/asfman/comments/36275.html</wfw:comment><comments>http://www.cnitblog.com/asfman/articles/36275.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/asfman/comments/commentRss/36275.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/asfman/services/trackbacks/36275.html</trackback:ping><description><![CDATA[&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br>&lt;component&gt;<br>&nbsp; &lt;registration progid="asfman.createTable" classid="{11223344-aabb-ccdd-eeff-012345678901}" description="创建数据库表" version="1"&gt;<br>&nbsp; &lt;script language="VBScript"&gt;<br>&nbsp; &lt;![CDATA[<br>&nbsp;&nbsp;&nbsp;&nbsp; Function Register<br>&nbsp;&nbsp;&nbsp; MsgBox "数据库表组件注册成功！",0,"注册信息"<br>&nbsp;&nbsp;End Function<br>&nbsp;&nbsp;Function UnRegister<br>&nbsp;&nbsp;&nbsp; MsgBox "数据库表组件卸载成功！",0,"卸载信息"<br>&nbsp;&nbsp;End Function<br>&nbsp;&nbsp;]]&gt;<br>&nbsp; &lt;/script&gt;<br>&nbsp; &lt;/registration&gt;<br>&nbsp;&lt;public&gt;<br>&nbsp;&nbsp;&nbsp; &lt;property name="Name" dispid="0" description="组件名称"&gt;<br>&nbsp;&nbsp;&nbsp; &lt;get internalName="componentName" /&gt;<br>&nbsp;&lt;/property&gt;<br>&nbsp;&nbsp;&nbsp; &lt;method name="createTable"&gt;<br>&nbsp;&nbsp;&nbsp; &lt;parameter name="connStr" description="数据库名字" /&gt;<br>&nbsp;&nbsp;&nbsp; &lt;parameter name="tName" description="表名" /&gt;<br>&nbsp;&nbsp;&nbsp; &lt;parameter name="config" description="一个对象包含字段名字和类型" /&gt;<br>&nbsp;&nbsp;&nbsp; &lt;parameter name="bFlag" description="boolean值,true为创建新的数据库，默认数据库已经存在" /&gt;<br>&nbsp;&lt;/method&gt;<br>&nbsp;&lt;/public&gt;<br>&lt;implements type="ASP"/&gt;<br>&lt;script language="Javascript"&gt;<br>&lt;![CDATA[<br>function componentName()<br>{<br>&nbsp;return "数据库表组件！"<br>}<br>var ColumnType = {<br>&nbsp;"SmallInt" : 2,&nbsp;&nbsp;// 整型<br>&nbsp;"Int" : 3,&nbsp;&nbsp;&nbsp;// 长整型<br>&nbsp;"Real" : 4,&nbsp;&nbsp;&nbsp;// 单精度型<br>&nbsp;"Float" : 5,&nbsp;&nbsp;// 双精度型<br>&nbsp;"Money" : 6,&nbsp;&nbsp;// 货币<br>&nbsp;"DateTime" : 7,&nbsp;&nbsp;// 日期时间<br>&nbsp;"Bit" : 11,&nbsp;&nbsp;&nbsp;// 是否<br>&nbsp;"TimeStamp" : 13,<br>&nbsp;"TinyInt" : 17,&nbsp;&nbsp;// 字节<br>&nbsp;"UniqueIdentifier" : 72,&nbsp;// 同步复制 ID<br>&nbsp;"Binary" : 128,<br>&nbsp;"Char" : 129,<br>&nbsp;"NChar" : 130,<br>&nbsp;"Decimal" : 131,&nbsp;&nbsp;// 小数<br>&nbsp;"Date" : 133,<br>&nbsp;"SmallDateTime" : 135,<br>&nbsp;"VarChar" : 202,&nbsp;&nbsp;// 文本<br>&nbsp;"Text" : 203,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //备注(200 sql varchar 201 sql text)<br>&nbsp;"Binary" : 204,&nbsp;&nbsp;&nbsp;// 二进制数据<br>&nbsp;"Image" : 205&nbsp;&nbsp;&nbsp;// OLE 对象<br>}<br>function enumDataType(strType)<br>{<br>&nbsp;strType = strType.toLowerCase();<br>&nbsp;for(var x in ColumnType)<br>&nbsp;{<br>&nbsp;&nbsp;if(x.toLowerCase() == strType) return ColumnType[x];<br>&nbsp;}<br>&nbsp;&nbsp;return 128;<br>}<br>function createTable(connStr,tName,config,bFlag)<br>{<br>&nbsp;var oCatalog = new ActiveXObject("AdoX.Catalog");<br>&nbsp;bFlag ? oCatalog.Create("Provider=Microsoft.Jet.OleDb.4.0;Data Source=" + connStr) : (oCatalog.ActiveConnection="Provider=Microsoft.Jet.OleDb.4.0;Data Source=" + connStr);<br>&nbsp;var oTable = new ActiveXObject("AdoX.Table");<br>&nbsp;oTable.Name = tName;<br>&nbsp;oTable.ParentCatalog = oCatalog;<br>&nbsp;oTable.Columns.Append("id",3);<br>&nbsp;oTable.Columns("id").Properties("AutoIncrement") = true;&nbsp;<br>&nbsp;for(var i in config)<br>&nbsp;{<br>&nbsp;&nbsp;if(config.hasOwnProperty(i))<br>&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;oTable.Columns.Append(i,enumDataType(config[i]));<br>&nbsp;&nbsp;}<br>&nbsp;}<br>&nbsp;&nbsp;&nbsp; oCatalog.Tables.Append(oTable);<br>&nbsp;oCatalog.ActiveConnection.Close();<br>&nbsp;oCatalog = null;<br>}<br>]]&gt;<br>&lt;/script&gt;<br>&lt;comment&gt;<br>示例：createTable("fk.mdb","fk3",{name:"varchar",value:"Text"},false);<br>&lt;/comment&gt;<br>&lt;/component&gt;
<img src ="http://www.cnitblog.com/asfman/aggbug/36275.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/asfman/" target="_blank">汪杰</a> 2007-11-14 16:44 <a href="http://www.cnitblog.com/asfman/articles/36275.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>http headers reference</title><link>http://www.cnitblog.com/asfman/articles/36218.html</link><dc:creator>汪杰</dc:creator><author>汪杰</author><pubDate>Tue, 13 Nov 2007 01:45:00 GMT</pubDate><guid>http://www.cnitblog.com/asfman/articles/36218.html</guid><wfw:comment>http://www.cnitblog.com/asfman/comments/36218.html</wfw:comment><comments>http://www.cnitblog.com/asfman/articles/36218.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/asfman/comments/commentRss/36218.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/asfman/services/trackbacks/36218.html</trackback:ping><description><![CDATA[<div class=topic>
<div class=majorTitle>Application&nbsp;Center&nbsp;Test</div>
<div class=title>HTTP Headers Reference</div>
<!--content type: PSDK_8. Transform: everett2mtps.xslt.-->
<div id=nstext valign="bottom">
<p>Both HTTP requests and HTTP responses use headers to send information about the HTTP message. A header is a series of lines, with each line containing a name followed by a colon and a space, and then a value. The fields can be arranged in any order. Some header fields are used in both request and response headers, while others are appropriate only for either a request or a response. </p>
<p>Many request header fields will allow the client to specify several acceptable options in the value part and, in some cases, even rank each option's preference. Multiple items are separated using a comma. For example, a client could send a request header that includes "Content-Encoding: gzip, compress," indicating it would accept either type of compression. If the server uses gzip encoding for the response body, its response header would include "Content-Encoding: gzip".</p>
<p>Some fields can occur more than once in a single header. For example, a header can have multiple "Warning" fields.</p>
<p>The following tables list HTTP 1.1 header fields. Note that some header fields are MIME fields. MIME fields are defined in the Internet Engineering Task Force (IETF) document RFC 2045, but they are also used by the HTTP 1.1 protocol. See the IETF page for more information about the MIME and HTTP 1.1 specifications.</p>
<a name=general_headers>
<h2 class=dtH2>General Header Fields</h2>
</a>
<p>General header fields can be used in request messages and response messages.</p>
<div class=tablediv>
<table class=dtTABLE>
    <tbody>
        <tr vAlign=top>
            <th>Name</th>
            <th>Example Value</th>
        </tr>
        <tr vAlign=top>
            <td>Cache-Control</td>
            <td>"max-age=10"</td>
        </tr>
        <tr vAlign=top>
            <td>Connection</td>
            <td>"close"</td>
        </tr>
        <tr vAlign=top>
            <td>Date</td>
            <td>"Tue, 11 Jul 2000 18:23:51 GMT"</td>
        </tr>
        <tr vAlign=top>
            <td>Pragma</td>
            <td>"no-cache"</td>
        </tr>
        <tr vAlign=top>
            <td>Trailer</td>
            <td>"Date"</td>
        </tr>
        <tr vAlign=top>
            <td>Transfer-Encoding</td>
            <td>"chunked"</td>
        </tr>
        <tr vAlign=top>
            <td>Upgrade</td>
            <td>"SHTTP/1.3"</td>
        </tr>
        <tr vAlign=top>
            <td>Via</td>
            <td>"HTTP/1.1 Proxy1, HTTP/1.1 Proxy2"</td>
        </tr>
        <tr vAlign=top>
            <td>Warning</td>
            <td>"112 Disconnected Operation"</td>
        </tr>
    </tbody>
</table>
</div>
<a name=request_headers>
<h2 class=dtH2>Request Header Fields </h2>
</a>
<p>Request header fields are used in request messages only.</p>
<div class=tablediv>
<table class=dtTABLE>
    <tbody>
        <tr vAlign=top>
            <th>Name</th>
            <th>Example Value</th>
        </tr>
        <tr vAlign=top>
            <td>Accept</td>
            <td>"text/html, image/*"</td>
        </tr>
        <tr vAlign=top>
            <td>Accept-Charset</td>
            <td>"iso8859-5"</td>
        </tr>
        <tr vAlign=top>
            <td>Accept-Encoding</td>
            <td>"gzip, compress"</td>
        </tr>
        <tr vAlign=top>
            <td>Accept-Language</td>
            <td>"en, fr"</td>
        </tr>
        <tr vAlign=top>
            <td>Authorization</td>
            <td>[credentials]</td>
        </tr>
        <tr vAlign=top>
            <td>Content-Encoding </td>
            <td>"gzip"</td>
        </tr>
        <tr vAlign=top>
            <td>Expect</td>
            <td>"100-continue"</td>
        </tr>
        <tr vAlign=top>
            <td>From</td>
            <td>"user@microsoft.com"</td>
        </tr>
        <tr vAlign=top>
            <td>Host</td>
            <td>"www.microsoft.com"</td>
        </tr>
        <tr vAlign=top>
            <td>If-Match</td>
            <td>"entity_tag001"</td>
        </tr>
        <tr vAlign=top>
            <td>If-Modified-Since</td>
            <td>"Tue, 11 Jul 2000 18:23:51 GMT"</td>
        </tr>
        <tr vAlign=top>
            <td>If-None-Match</td>
            <td>"entity_tag001"</td>
        </tr>
        <tr vAlign=top>
            <td>If-Range</td>
            <td>"entity_tag001" or "Tue, 11 Jul 2000 18:23:51 GMT"</td>
        </tr>
        <tr vAlign=top>
            <td>If-Unmodified-Since</td>
            <td>"Tue, 11 Jul 2000 18:23:51 GMT"</td>
        </tr>
        <tr vAlign=top>
            <td>Max-Forwards</td>
            <td>"3"</td>
        </tr>
        <tr vAlign=top>
            <td>Proxy-Authorization</td>
            <td>[credentials]</td>
        </tr>
        <tr vAlign=top>
            <td>Range</td>
            <td>"bytes=100-599"</td>
        </tr>
        <tr vAlign=top>
            <td>Referer</td>
            <td>"http://www.microsoft.com/resources.asp"</td>
        </tr>
        <tr vAlign=top>
            <td>TE</td>
            <td>"trailers"</td>
        </tr>
        <tr vAlign=top>
            <td>User-Agent</td>
            <td>"Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"</td>
        </tr>
    </tbody>
</table>
</div>
<a name=response_headers>
<h2 class=dtH2>Response Header Fields </h2>
</a>
<p>Response header fields are used in response messages only.</p>
<div class=tablediv>
<table class=dtTABLE>
    <tbody>
        <tr vAlign=top>
            <th>Name</th>
            <th>Example Value</th>
        </tr>
        <tr vAlign=top>
            <td>Accept-Ranges</td>
            <td>"none"</td>
        </tr>
        <tr vAlign=top>
            <td>Age</td>
            <td>"2147483648(2^31)"</td>
        </tr>
        <tr vAlign=top>
            <td>ETag</td>
            <td>"b38b9-17dd-367c5dcd"</td>
        </tr>
        <tr vAlign=top>
            <td>Last-Modified</td>
            <td>"Tue, 11 Jul 2000 18:23:51 GMT"</td>
        </tr>
        <tr vAlign=top>
            <td>Location</td>
            <td>"http://localhost/redirecttarget.asp"</td>
        </tr>
        <tr vAlign=top>
            <td>Proxy-Authenticate</td>
            <td>[challenge]</td>
        </tr>
        <tr vAlign=top>
            <td>Retry-After</td>
            <td>"Tue, 11 Jul 2000 18:23:51 GMT" or "60"</td>
        </tr>
        <tr vAlign=top>
            <td>Server</td>
            <td>"Microsoft-IIS/5.0"</td>
        </tr>
        <tr vAlign=top>
            <td>Vary</td>
            <td>"Date"</td>
        </tr>
        <tr vAlign=top>
            <td>WWW-Authenticate</td>
            <td>[challenge]</td>
        </tr>
    </tbody>
</table>
</div>
<a name=response_headers>
<h2 class=dtH2>Entity Header Fields </h2>
</a>
<p>Entity header fields can be used in request messages or response messages. Entity header fields contain information about the entity-body of the message, such as the encoding format used.</p>
<div class=tablediv>
<table class=dtTABLE>
    <tbody>
        <tr vAlign=top>
            <th>Name</th>
            <th>Example Value</th>
        </tr>
        <tr vAlign=top>
            <td>Allow</td>
            <td>"GET, HEAD"</td>
        </tr>
        <tr vAlign=top>
            <td>Content-Encoding</td>
            <td>"gzip"</td>
        </tr>
        <tr vAlign=top>
            <td>Content-Language</td>
            <td>"en"</td>
        </tr>
        <tr vAlign=top>
            <td>Content-Length</td>
            <td>"8445"</td>
        </tr>
        <tr vAlign=top>
            <td>Content-Location</td>
            <td>"http://localhost/page.asp"</td>
        </tr>
        <tr vAlign=top>
            <td>Content-MD5</td>
            <td>[md5-digest]</td>
        </tr>
        <tr vAlign=top>
            <td>Content-Range</td>
            <td>"bytes 2543-4532/7898"</td>
        </tr>
        <tr vAlign=top>
            <td>Content-Type</td>
            <td>"text/html"</td>
        </tr>
        <tr vAlign=top>
            <td>Expires</td>
            <td>"Tue, 11 Jul 2000 18:23:51 GMT"</td>
        </tr>
        <tr vAlign=top>
            <td>Last-Modified</td>
            <td>"Tue, 11 Jul 2000 18:23:51 GMT"</td>
        </tr>
    </tbody>
</table>
</div>
<a name=request_example>
<h2 class=dtH2>Request Header Example</h2>
</a>
<p>The following is a simple example of an HTTP request.</p>
<div class=code id=ctl00_LibFrame_ctl02_>
<div class=CodeSnippetTitleBar>
<div class=CodeDisplayLanguage></div>
<div class=CopyCodeButton><a class=copyCode href="javascript:CopyCode('ctl00_LibFrame_ctl02');"><img height=9 src="http://msdn2.microsoft.com/msdn/Controls/CodeSnippet/en-us/copy_off.gif" align=middle border=0> Copy Code</a></div>
</div>
<pre class=code id=ctl00_LibFrame_ctl02 space="preserve">GET /articles/news/today.asp HTTP/1.1</pre>
</div>
<div class=code id=ctl00_LibFrame_ctl03_>
<div class=CodeSnippetTitleBar>
<div class=CodeDisplayLanguage></div>
<div class=CopyCodeButton><a class=copyCode href="javascript:CopyCode('ctl00_LibFrame_ctl03');"><img height=9 src="http://msdn2.microsoft.com/msdn/Controls/CodeSnippet/en-us/copy_off.gif" align=middle border=0> Copy Code</a></div>
</div>
<pre class=code id=ctl00_LibFrame_ctl03 space="preserve">Accept: */*</pre>
</div>
<div class=code id=ctl00_LibFrame_ctl04_>
<div class=CodeSnippetTitleBar>
<div class=CodeDisplayLanguage></div>
<div class=CopyCodeButton><a class=copyCode href="javascript:CopyCode('ctl00_LibFrame_ctl04');"><img height=9 src="http://msdn2.microsoft.com/msdn/Controls/CodeSnippet/en-us/copy_off.gif" align=middle border=0> Copy Code</a></div>
</div>
<pre class=code id=ctl00_LibFrame_ctl04 space="preserve">Accept-Language: en-us</pre>
</div>
<div class=code id=ctl00_LibFrame_ctl05_>
<div class=CodeSnippetTitleBar>
<div class=CodeDisplayLanguage></div>
<div class=CopyCodeButton><a class=copyCode href="javascript:CopyCode('ctl00_LibFrame_ctl05');"><img height=9 src="http://msdn2.microsoft.com/msdn/Controls/CodeSnippet/en-us/copy_off.gif" align=middle border=0> Copy Code</a></div>
</div>
<pre class=code id=ctl00_LibFrame_ctl05 space="preserve">Connection: Keep-Alive</pre>
</div>
<div class=code id=ctl00_LibFrame_ctl06_>
<div class=CodeSnippetTitleBar>
<div class=CodeDisplayLanguage></div>
<div class=CopyCodeButton><a class=copyCode href="javascript:CopyCode('ctl00_LibFrame_ctl06');"><img height=9 src="http://msdn2.microsoft.com/msdn/Controls/CodeSnippet/en-us/copy_off.gif" align=middle border=0> Copy Code</a></div>
</div>
<pre class=code id=ctl00_LibFrame_ctl06 space="preserve">Host: localhost</pre>
</div>
<div class=code id=ctl00_LibFrame_ctl07_>
<div class=CodeSnippetTitleBar>
<div class=CodeDisplayLanguage></div>
<div class=CopyCodeButton><a class=copyCode href="javascript:CopyCode('ctl00_LibFrame_ctl07');"><img height=9 src="http://msdn2.microsoft.com/msdn/Controls/CodeSnippet/en-us/copy_off.gif" align=middle border=0> Copy Code</a></div>
</div>
<pre class=code id=ctl00_LibFrame_ctl07 space="preserve">Referer: http://localhost/links.asp</pre>
</div>
<div class=code id=ctl00_LibFrame_ctl08_>
<div class=CodeSnippetTitleBar>
<div class=CodeDisplayLanguage></div>
<div class=CopyCodeButton><a class=copyCode href="javascript:CopyCode('ctl00_LibFrame_ctl08');"><img height=9 src="http://msdn2.microsoft.com/msdn/Controls/CodeSnippet/en-us/copy_off.gif" align=middle border=0> Copy Code</a></div>
</div>
<pre class=code id=ctl00_LibFrame_ctl08 space="preserve">User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)</pre>
</div>
<div class=code id=ctl00_LibFrame_ctl09_>
<div class=CodeSnippetTitleBar>
<div class=CodeDisplayLanguage></div>
<div class=CopyCodeButton><a class=copyCode href="javascript:CopyCode('ctl00_LibFrame_ctl09');"><img height=9 src="http://msdn2.microsoft.com/msdn/Controls/CodeSnippet/en-us/copy_off.gif" align=middle border=0> Copy Code</a></div>
</div>
<pre class=code id=ctl00_LibFrame_ctl09 space="preserve">Accept-Encoding: gzip, deflate</pre>
</div>
<p>This request has a request-line, which includes the method (GET), the resource path (/articles/news/today.asp) and the HTTP version (HTTP/1.1). Everything after the request-line is part of the header, since this request does not have a body. Following the header is an empty line, which marks the end of the headers.</p>
<a name=response_example>
<h2 class=dtH2>Response Header Example</h2>
</a>
<p>The Web server could respond to the previous request in a number of ways. Assuming the file was accessible and the user had rights to view it, the response would be similar to the following:</p>
<div class=code id=ctl00_LibFrame_ctl10_>
<div class=CodeSnippetTitleBar>
<div class=CodeDisplayLanguage></div>
<div class=CopyCodeButton><a class=copyCode href="javascript:CopyCode('ctl00_LibFrame_ctl10');"><img height=9 src="http://msdn2.microsoft.com/msdn/Controls/CodeSnippet/en-us/copy_off.gif" align=middle border=0> Copy Code</a></div>
</div>
<pre class=code id=ctl00_LibFrame_ctl10 space="preserve">HTTP/1.1 200 OK</pre>
</div>
<div class=code id=ctl00_LibFrame_ctl11_>
<div class=CodeSnippetTitleBar>
<div class=CodeDisplayLanguage></div>
<div class=CopyCodeButton><a class=copyCode href="javascript:CopyCode('ctl00_LibFrame_ctl11');"><img height=9 src="http://msdn2.microsoft.com/msdn/Controls/CodeSnippet/en-us/copy_off.gif" align=middle border=0> Copy Code</a></div>
</div>
<pre class=code id=ctl00_LibFrame_ctl11 space="preserve">Server: Microsoft-IIS/5.0</pre>
</div>
<div class=code id=ctl00_LibFrame_ctl12_>
<div class=CodeSnippetTitleBar>
<div class=CodeDisplayLanguage></div>
<div class=CopyCodeButton><a class=copyCode href="javascript:CopyCode('ctl00_LibFrame_ctl12');"><img height=9 src="http://msdn2.microsoft.com/msdn/Controls/CodeSnippet/en-us/copy_off.gif" align=middle border=0> Copy Code</a></div>
</div>
<pre class=code id=ctl00_LibFrame_ctl12 space="preserve">Date: Thu, 13 Jul 2000 05:46:53 GMT</pre>
</div>
<div class=code id=ctl00_LibFrame_ctl13_>
<div class=CodeSnippetTitleBar>
<div class=CodeDisplayLanguage></div>
<div class=CopyCodeButton><a class=copyCode href="javascript:CopyCode('ctl00_LibFrame_ctl13');"><img height=9 src="http://msdn2.microsoft.com/msdn/Controls/CodeSnippet/en-us/copy_off.gif" align=middle border=0> Copy Code</a></div>
</div>
<pre class=code id=ctl00_LibFrame_ctl13 space="preserve">Content-Length: 2291</pre>
</div>
<div class=code id=ctl00_LibFrame_ctl14_>
<div class=CodeSnippetTitleBar>
<div class=CodeDisplayLanguage></div>
<div class=CopyCodeButton><a class=copyCode href="javascript:CopyCode('ctl00_LibFrame_ctl14');"><img height=9 src="http://msdn2.microsoft.com/msdn/Controls/CodeSnippet/en-us/copy_off.gif" align=middle border=0> Copy Code</a></div>
</div>
<pre class=code id=ctl00_LibFrame_ctl14 space="preserve">Content-Type: text/html</pre>
</div>
<div class=code id=ctl00_LibFrame_ctl15_>
<div class=CodeSnippetTitleBar>
<div class=CodeDisplayLanguage></div>
<div class=CopyCodeButton><a class=copyCode href="javascript:CopyCode('ctl00_LibFrame_ctl15');"><img height=9 src="http://msdn2.microsoft.com/msdn/Controls/CodeSnippet/en-us/copy_off.gif" align=middle border=0> Copy Code</a></div>
</div>
<pre class=code id=ctl00_LibFrame_ctl15 space="preserve">Set-Cookie: ASPSESSIONIDQQGGGNCG=LKLDFFKCINFLDMFHCBCBMFLJ; path=/</pre>
</div>
<div class=code id=ctl00_LibFrame_ctl16_>
<div class=CodeSnippetTitleBar>
<div class=CodeDisplayLanguage></div>
<div class=CopyCodeButton><a class=copyCode href="javascript:CopyCode('ctl00_LibFrame_ctl16');"><img height=9 src="http://msdn2.microsoft.com/msdn/Controls/CodeSnippet/en-us/copy_off.gif" align=middle border=0> Copy Code</a></div>
</div>
<pre class=code id=ctl00_LibFrame_ctl16 space="preserve">Cache-control: private</pre>
</div>
<div class=code id=ctl00_LibFrame_ctl17_>
<div class=CodeSnippetTitleBar>
<div class=CodeDisplayLanguage></div>
<div class=CopyCodeButton><a class=copyCode href="javascript:CopyCode('ctl00_LibFrame_ctl17');"><img height=9 src="http://msdn2.microsoft.com/msdn/Controls/CodeSnippet/en-us/copy_off.gif" align=middle border=0> Copy Code</a></div>
</div>
<pre class=code id=ctl00_LibFrame_ctl17 space="preserve"></pre>
</div>
<div class=code id=ctl00_LibFrame_ctl18_>
<div class=CodeSnippetTitleBar>
<div class=CodeDisplayLanguage></div>
<div class=CopyCodeButton><a class=copyCode href="javascript:CopyCode('ctl00_LibFrame_ctl18');"><img height=9 src="http://msdn2.microsoft.com/msdn/Controls/CodeSnippet/en-us/copy_off.gif" align=middle border=0> Copy Code</a></div>
</div>
<pre class=code id=ctl00_LibFrame_ctl18 space="preserve">&lt;HTML&gt;</pre>
</div>
<div class=code id=ctl00_LibFrame_ctl19_>
<div class=CodeSnippetTitleBar>
<div class=CodeDisplayLanguage></div>
<div class=CopyCodeButton><a class=copyCode href="javascript:CopyCode('ctl00_LibFrame_ctl19');"><img height=9 src="http://msdn2.microsoft.com/msdn/Controls/CodeSnippet/en-us/copy_off.gif" align=middle border=0> Copy Code</a></div>
</div>
<pre class=code id=ctl00_LibFrame_ctl19 space="preserve">&lt;BODY&gt;</pre>
</div>
<div class=code id=ctl00_LibFrame_ctl20_>
<div class=CodeSnippetTitleBar>
<div class=CodeDisplayLanguage></div>
<div class=CopyCodeButton><a class=copyCode href="javascript:CopyCode('ctl00_LibFrame_ctl20');"><img height=9 src="http://msdn2.microsoft.com/msdn/Controls/CodeSnippet/en-us/copy_off.gif" align=middle border=0> Copy Code</a></div>
</div>
<pre class=code id=ctl00_LibFrame_ctl20 space="preserve">...</pre>
</div>
<p>The first line of the response is called the status-line. It contains the HTTP version used for the response, the status code (200), and the reason phrase. There is a header, with five fields in this example, followed by an empty line (a carriage return and line feed) and then the first two lines of the response body.</p>
<h4 class=dtH4>See Also</h4>
<p><a onclick="javascript:Track('ctl00_LibFrame_ctl01|ctl00_LibFrame_ctl21',this);" href="http://msdn2.microsoft.com/en-us/library/aa287838(VS.71).aspx">Request.Headers property</a> | <a onclick="javascript:Track('ctl00_LibFrame_ctl01|ctl00_LibFrame_ctl22',this);" href="http://msdn2.microsoft.com/en-us/library/aa287837(VS.71).aspx">Response.Headers property</a> | <a onclick="javascript:Track('ctl00_LibFrame_ctl01|ctl00_LibFrame_ctl23',this);" href="http://msdn2.microsoft.com/en-us/library/aa287672(VS.71).aspx">Headers object</a> | <a onclick="javascript:Track('ctl00_LibFrame_ctl01|ctl00_LibFrame_ctl24',this);" href="http://msdn2.microsoft.com/en-us/library/aa287670(VS.71).aspx">Header object</a> | <a onclick="javascript:Track('ctl00_LibFrame_ctl01|ctl00_LibFrame_ctl25',this);" href="http://www.ietf.org/">Internet Engineering Task Force main page</a></p>
</div>
</div>
<img src ="http://www.cnitblog.com/asfman/aggbug/36218.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/asfman/" target="_blank">汪杰</a> 2007-11-13 09:45 <a href="http://www.cnitblog.com/asfman/articles/36218.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>http response headers </title><link>http://www.cnitblog.com/asfman/articles/36217.html</link><dc:creator>汪杰</dc:creator><author>汪杰</author><pubDate>Tue, 13 Nov 2007 01:35:00 GMT</pubDate><guid>http://www.cnitblog.com/asfman/articles/36217.html</guid><wfw:comment>http://www.cnitblog.com/asfman/comments/36217.html</wfw:comment><comments>http://www.cnitblog.com/asfman/articles/36217.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/asfman/comments/commentRss/36217.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/asfman/services/trackbacks/36217.html</trackback:ping><description><![CDATA[<div class=title xmlns:msxsl="urn:schemas-microsoft-com:xslt">HTTP Response Headers</div>
<!--content type: SDKML. Transform: wc2mtps.xslt.-->
<div class=clsDocBody>
<p>The following list contains valid HTTP response headers. Use these headers to provide information about your HTML document in a <a onclick="javascript:Track('ctl00_LibFrame_ctl01|ctl00_LibFrame_ctl02',this);" href="http://msdn2.microsoft.com/en-us/library/ms535853.aspx"><u><font color=#0000ff>meta</font></u></a> tag, or to gather information about another document using <a onclick="javascript:Track('ctl00_LibFrame_ctl01|ctl00_LibFrame_ctl03',this);" href="http://msdn2.microsoft.com/en-us/library/aa384238.aspx"><u><font color=#0000ff>HttpQueryInfo</font></u></a> and <a onclick="javascript:Track('ctl00_LibFrame_ctl01|ctl00_LibFrame_ctl04',this);" href="http://msdn2.microsoft.com/en-us/library/ms774972.aspx"><u><font color=#0000ff>QueryInfo</font></u></a>.</p>
<p class=clsRef>Constants</p>
<blockquote>
<dl class=clsRef>
<dt><strong><a name=ACCEPT><strong>ACCEPT</strong></a></strong>&nbsp;(24)
<dd>Acceptable media types.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=ACCEPT-CHARSET><strong>ACCEPT-CHARSET</strong></a></strong>&nbsp;(25)
<dd>Acceptable character sets.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=ACCEPT-ENCODING><strong>ACCEPT-ENCODING</strong></a></strong>&nbsp;(26)
<dd>Acceptable content-coding values.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=ACCEPT-LANGUAGE><strong>ACCEPT-LANGUAGE</strong></a></strong>&nbsp;(27)
<dd>Acceptable natural languages.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=ACCEPT-RANGES><strong>ACCEPT-RANGES</strong></a></strong>&nbsp;(42)
<dd>Types of range requests that are accepted.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=AGE><strong>AGE</strong></a></strong>&nbsp;(48)
<dd>An estimate of the amount of time since the response was generated at the origin server.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=ALLOW><strong>ALLOW</strong></a></strong>&nbsp;(7)
<dd>Methods supported by the server.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=AUTHORIZATION><strong>AUTHORIZATION</strong></a></strong>&nbsp;(28)
<dd>Authorization credentials used for a request.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=CACHE-CONTROL><strong>CACHE-CONTROL</strong></a></strong>&nbsp;(49)
<dd>Cache control directives.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=CONNECTION><strong>CONNECTION</strong></a></strong>&nbsp;(23)
<dd>Options that are specified for a particular connection and must not be communicated by proxies over further connections.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=CONTENT-BASE><strong>CONTENT-BASE</strong></a></strong>&nbsp;(50)
<dd>Base Uniform Resource Identifier (URI) for resolving relative URLs within the entity.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=CONTENT-DESCRIPTION><strong>CONTENT-DESCRIPTION</strong></a></strong>&nbsp;(4)
<dd>Obsolete. Maintained for legacy application compatibility only.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=CONTENT-DISPOSITION><strong>CONTENT-DISPOSITION</strong></a></strong>&nbsp;(47)
<dd>Obsolete. Maintained for legacy application compatibility only.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=CONTENT-ENCODING><strong>CONTENT-ENCODING</strong></a></strong>&nbsp;(29)
<dd>Any additional content codings that have been applied to the entire resource.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=CONTENT-ID><strong>CONTENT-ID</strong></a></strong>&nbsp;(3)
<dd>Content identification.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=CONTENT-LANGUAGE><strong>CONTENT-LANGUAGE</strong></a></strong>&nbsp;(6)
<dd>Language in which the content is presented.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=CONTENT-LENGTH><strong>CONTENT-LENGTH</strong></a></strong>&nbsp;(5)
<dd>Size of the resource, in bytes.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=CONTENT-LOCATION><strong>CONTENT-LOCATION</strong></a></strong>&nbsp;(51)
<dd>Resource location for the entity enclosed in the message.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=CONTENT-MD5><strong>CONTENT-MD5</strong></a></strong>&nbsp;(52)
<dd>MD5 digest of the entity-body for the purpose of providing an end-to-end message integrity check (MIC) for the entity-body. For more information, see RFC1864, The Content-MD5 Header Field, at <a onclick="javascript:Track('ctl00_LibFrame_ctl01|ctl00_LibFrame_ctl05',this);" href="http://ftp.isi.edu/in-notes/rfc1864.txt"><u><font color=#0000ff>http://ftp.isi.edu/in-notes/rfc1864.txt</font></u></a>&nbsp;<img height=11 alt="World Wide Web link" src="http://msdn2.microsoft.com/en-us/library/ms537417.leave-site(en-us,VS.85).gif" width=17 border=0>.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=CONTENT-RANGE><strong>CONTENT-RANGE</strong></a></strong>&nbsp;(53)
<dd>Location in the full entity-body where the partial entity-body should be inserted and the total size of the full entity-body.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=CONTENT-TRANSFER_ENCODING><strong>CONTENT-TRANSFER_ENCODING</strong></a></strong>&nbsp;(2)
<dd>Additional content coding that has been applied to the resource.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=CONTENT-TYPE><strong>CONTENT-TYPE</strong></a></strong>&nbsp;(1)
<dd>Content type of the resource (such as text/html).
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=COOKIE><strong>COOKIE</strong></a></strong>&nbsp;(44)
<dd>Cookies associated with the request.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=COST><strong>COST</strong></a></strong>&nbsp;(15)
<dd>Not supported.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=DATE><strong>DATE</strong></a></strong>&nbsp;(9)
<dd>Date and time at which the message was originated.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=DERIVED-FROM><strong>DERIVED-FROM</strong></a></strong>&nbsp;(14)
<dd>Not supported.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=ECHO-HEADERS><strong>ECHO-HEADERS</strong></a></strong>&nbsp;(73)
<dd>Not implemented.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=ECHO-HEADERS-CRLF><strong>ECHO-HEADERS-CRLF</strong></a></strong>&nbsp;(74)
<dd>Not implemented.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=ECHO-REPLY><strong>ECHO-REPLY</strong></a></strong>&nbsp;(72)
<dd>Not implemented.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=ECHO-REQUEST><strong>ECHO-REQUEST</strong></a></strong>&nbsp;(71)
<dd>Not implemented.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=ETAG><strong>ETAG</strong></a></strong>&nbsp;(54)
<dd>Entity tag for the associated entity.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=EXPECT><strong>EXPECT</strong></a></strong>&nbsp;(68)
<dd>Expect header, which indicates whether the client application should expect 100 series responses.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=EXPIRES><strong>EXPIRES</strong></a></strong>&nbsp;(10)
<dd>Date and time after which the resource should be considered outdated.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=FORWARDED><strong>FORWARDED</strong></a></strong>&nbsp;(30)
<dd>Obsolete. Maintained for legacy application compatibility only.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=FROM><strong>FROM</strong></a></strong>&nbsp;(31)
<dd>E-mail address for the human user who controls the requesting user agent if the From header is given.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=HOST><strong>HOST</strong></a></strong>&nbsp;(55)
<dd>Internet host and port number of the resource being requested.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=IF-MATCH><strong>IF-MATCH</strong></a></strong>&nbsp;(56)
<dd>Contents of the If-Match request-header field.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=IF-MODIFIED-SINCE><strong>IF-MODIFIED-SINCE</strong></a></strong>&nbsp;(32)
<dd>Contents of the If-Modified-Since header.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=IF-NONE-MATCH><strong>IF-NONE-MATCH</strong></a></strong>&nbsp;(57)
<dd>Contents of the If-None-Match request-header field.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=IF-RANGE><strong>IF-RANGE</strong></a></strong>&nbsp;(58)
<dd>Contents of the If-Range request-header field. This header allows the client application to check if the entity related to a partial copy of the entity in the client application's cache has not been updated. If the entity has not been updated, send the parts that the client application is missing. If the entity has been updated, send the entire updated entity.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=IF-UNMODIFIED-SINCE><strong>IF-UNMODIFIED-SINCE</strong></a></strong>&nbsp;(59)
<dd>Contents of the If-Unmodified-Since request-header field.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=LAST-MODIFIED><strong>LAST-MODIFIED</strong></a></strong>&nbsp;(11)
<dd>Date and time at which the server believes the resource was last modified.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=LINK><strong>LINK</strong></a></strong>&nbsp;(16)
<dd>Obsolete. Maintained for legacy application compatibility only.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=LOCATION><strong>LOCATION</strong></a></strong>&nbsp;(33)
<dd>Absolute URI.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=MAX><strong>MAX</strong></a></strong>&nbsp;(75)
<dd>Not a query flag. Indicates the maximum value of an * value.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=MAX-FORWARDS><strong>MAX-FORWARDS</strong></a></strong>&nbsp;(60)
<dd>Number of proxies or gateways that can forward the request to the next inbound server.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=MESSAGE-ID><strong>MESSAGE-ID</strong></a></strong>&nbsp;(12)
<dd>Not supported.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=MIME-VERSION><strong>MIME-VERSION</strong></a></strong>&nbsp;(0)
<dd>Version of the MIME protocol that was used to construct the message.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=MSTHEMECOMPATIBLE><strong>MSTHEMECOMPATIBLE</strong></a></strong>&nbsp;
<dd>Microsoft Internet Explorer 6 and later. Disables theming support for a Web page. The <a onclick="javascript:Track('ctl00_LibFrame_ctl01|ctl00_LibFrame_ctl06',this);" href="http://msdn2.microsoft.com/en-us/library/ms533689.aspx"><u><font color=#0000ff>content</font></u></a> attribute of the <strong>meta</strong> element must be set to <code xmlns:msxsl="urn:schemas-microsoft-com:xslt">no</code>.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=ORIG-URI><strong>ORIG-URI</strong></a></strong>&nbsp;(34)
<dd>Obsolete. Maintained for legacy application compatibility only.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=PRAGMA><strong>PRAGMA</strong></a></strong>&nbsp;(17)
<dd>Implementation-specific directives that might apply to any recipient along the request/response chain.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=PROXY-AUTHENTICATE><strong>PROXY-AUTHENTICATE</strong></a></strong>&nbsp;(41)
<dd>Authentication scheme and realm returned by the proxy.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=PROXY-AUTHORIZATION><strong>PROXY-AUTHORIZATION</strong></a></strong>&nbsp;(61)
<dd>Header that is used to identify the user to a proxy that requires authentication. This header can only be retrieved before the request is sent to the server.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=PROXY-CONNECTION><strong>PROXY-CONNECTION</strong></a></strong>&nbsp;(69)
<dd>Proxy-Connection header.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=PUBLIC><strong>PUBLIC</strong></a></strong>&nbsp;(8)
<dd>Methods available at this server.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=RANGE><strong>RANGE</strong></a></strong>&nbsp;(62)
<dd>Byte range of an entity.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=RAW-HEADERS><strong>RAW-HEADERS</strong></a></strong>&nbsp;(21)
<dd>All the headers returned by the server. Each header is terminated by "\0". An additional "\0" terminates the list of headers.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=RAW-HEADERS-CRLF><strong>RAW-HEADERS-CRLF</strong></a></strong>&nbsp;(22)
<dd>All the headers returned by the server. Each header is separated by a carriage return/line feed (CR/LF) sequence.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=REFERER><strong>REFERER</strong></a></strong>&nbsp;(35)
<dd>URI of the resource where the requested URI was obtained.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=REFRESH><strong>REFRESH</strong></a></strong>&nbsp;(46)
<dd>Obsolete. Maintained for legacy application compatibility only.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=REQUEST-METHOD><strong>REQUEST-METHOD</strong></a></strong>&nbsp;(45)
<dd>Verb that is used in the request, typically GET or POST.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=RETRY-AFTER><strong>RETRY-AFTER</strong></a></strong>&nbsp;(36)
<dd>Amount of time the service is expected to be unavailable.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=SERVER><strong>SERVER</strong></a></strong>&nbsp;(37)
<dd>Information about the software used by the origin server to handle the request.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=SET-COOKIE><strong>SET-COOKIE</strong></a></strong>&nbsp;(43)
<dd>Value of the cookie set for the request.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=STATUS-CODE><strong>STATUS-CODE</strong></a></strong>&nbsp;(19)
<dd>Status code returned by the server. For a list of possible values, see <a onclick="javascript:Track('ctl00_LibFrame_ctl01|ctl00_LibFrame_ctl07',this);" href="http://msdn2.microsoft.com/en-us/library/aa384325.aspx"><u><font color=#0000ff>HTTP Status Codes</font></u></a>.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=STATUS-TEXT><strong>STATUS-TEXT</strong></a></strong>&nbsp;(20)
<dd>Any additional text returned by the server on the response line.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=TITLE><strong>TITLE</strong></a></strong>&nbsp;(38)
<dd>Obsolete. Maintained for legacy application compatibility only.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=TRANSFER-ENCODING><strong>TRANSFER-ENCODING</strong></a></strong>&nbsp;(63)
<dd>Type of transformation that has been applied to the message body so it can be safely transferred between the sender and recipient.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=UNLESS-MODIFIED-SINCE><strong>UNLESS-MODIFIED-SINCE</strong></a></strong>&nbsp;(70)
<dd>Unless-Modified-Since header.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=UPGRADE><strong>UPGRADE</strong></a></strong>&nbsp;(64)
<dd>Additional communication protocols that are supported by the server.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=URI><strong>URI</strong></a></strong>&nbsp;(13)
<dd>Some or all of the URIs by which the Request-URI resource can be identified.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=USER-AGENT><strong>USER-AGENT</strong></a></strong>&nbsp;(39)
<dd>Information about the user agent that made the request.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=VARY><strong>VARY</strong></a></strong>&nbsp;(65)
<dd>Header that indicates that the entity was selected from a number of available representations of the response using server-driven negotiation.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=VERSION><strong>VERSION</strong></a></strong>&nbsp;(18)
<dd>Last response code returned by the server.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=VIA><strong>VIA</strong></a></strong>&nbsp;(66)
<dd>Intermediate protocols and recipients between the user agent and the server on requests, and between the origin server and the client on responses.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=WARNING><strong>WARNING</strong></a></strong>&nbsp;(67)
<dd>Additional information about the status of a response that might not be reflected by the response status code.
<p>
<dl class=clsRef><!----></dl>
<dt><strong><a name=WWW-AUTHENTICATE><strong>WWW-AUTHENTICATE</strong></a></strong>&nbsp;(40)
<dd>Authentication scheme and realm returned by the server.
<p>
<dl class=clsRef><!----></dl></dd></dl></blockquote>
<p class=clsRef>Remarks</p>
<blockquote>
<p>A response header can be created using the <a onclick="javascript:Track('ctl00_LibFrame_ctl01|ctl00_LibFrame_ctl08',this);" href="http://msdn2.microsoft.com/en-us/library/ms533876.aspx"><u><font color=#0000ff>HTTP-EQUIV</font></u></a> attribute of the <strong>meta</strong> tag.</p>
<p>Corresponding values are provided for use with <strong>HttpQueryInfo</strong> and <strong>QueryInfo</strong>.</p>
<p>In Internet Explorer 6, The MSTHEMECOMPATIBLE constant disables theming support within Web pages. </p>
</blockquote></div>
<img src ="http://www.cnitblog.com/asfman/aggbug/36217.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/asfman/" target="_blank">汪杰</a> 2007-11-13 09:35 <a href="http://www.cnitblog.com/asfman/articles/36217.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>just CusorType=1 will be ok</title><link>http://www.cnitblog.com/asfman/articles/36002.html</link><dc:creator>汪杰</dc:creator><author>汪杰</author><pubDate>Thu, 08 Nov 2007 01:00:00 GMT</pubDate><guid>http://www.cnitblog.com/asfman/articles/36002.html</guid><wfw:comment>http://www.cnitblog.com/asfman/comments/36002.html</wfw:comment><comments>http://www.cnitblog.com/asfman/articles/36002.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/asfman/comments/commentRss/36002.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/asfman/services/trackbacks/36002.html</trackback:ping><description><![CDATA[当直接使用ActiveConnection的Execute时需要设置CursorLocation=3客户端游标，否这RecordCoun返回-1<br><br>当使用rs.Open(),只要设置CusorType=1 然后设置LockType=3就通用了<br>，如果不设置CusorType结果就会返回-1。所以通用设置为：<br>CursorType=1;<br>LockType=3;<br>CursorLocation=2//默认也是2 ，所设置不设置无所谓<br>var sql = "select * from messages order by id desc";<br>var Rs= Server.CreateObject("ADOR.RecordSet");<br>Rs.ActiveConnection=DH.ConnStr;<br>Rs.CursorType = 1;<br>Rs.LockType = 3;<br>//Rs.CursorLocation = 2;<br>Rs.Source = sql;<br>Rs.Open();<br>Response.Write(Rs.CursorType+"&lt;br&gt;");<br>Response.Write(Rs.LockType+"&lt;br&gt;");<br>Response.Write(Rs.CursorLocation+"&lt;br&gt;");<br>Response.Write(Rs.RecordCount);<br>
<img src ="http://www.cnitblog.com/asfman/aggbug/36002.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/asfman/" target="_blank">汪杰</a> 2007-11-08 09:00 <a href="http://www.cnitblog.com/asfman/articles/36002.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>jscript ado &amp;&amp; adox 应用的几个技巧</title><link>http://www.cnitblog.com/asfman/articles/35861.html</link><dc:creator>汪杰</dc:creator><author>汪杰</author><pubDate>Sun, 04 Nov 2007 15:25:00 GMT</pubDate><guid>http://www.cnitblog.com/asfman/articles/35861.html</guid><wfw:comment>http://www.cnitblog.com/asfman/comments/35861.html</wfw:comment><comments>http://www.cnitblog.com/asfman/articles/35861.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/asfman/comments/commentRss/35861.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/asfman/services/trackbacks/35861.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 说明:&nbsp;本文介绍了几个 asp/jscript 使用 ado&nbsp;操作数据库表的实用技巧.&nbsp;&nbsp;主要为:&nbsp;GetRows()&nbsp;GetString()&nbsp;Save()&nbsp;Open()&nbsp;&nbsp;及 adox 操作数据库的实用技巧, 为&nbsp;建,删,改 视图.&nbsp;建库&nbsp;建表+栏&nbsp;&nbs...&nbsp;&nbsp;<a href='http://www.cnitblog.com/asfman/articles/35861.html'>阅读全文</a><img src ="http://www.cnitblog.com/asfman/aggbug/35861.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/asfman/" target="_blank">汪杰</a> 2007-11-04 23:25 <a href="http://www.cnitblog.com/asfman/articles/35861.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>服务端 jscript 生成随机数图片验证码 by shawl.qiu</title><link>http://www.cnitblog.com/asfman/articles/35860.html</link><dc:creator>汪杰</dc:creator><author>汪杰</author><pubDate>Sun, 04 Nov 2007 15:21:00 GMT</pubDate><guid>http://www.cnitblog.com/asfman/articles/35860.html</guid><wfw:comment>http://www.cnitblog.com/asfman/comments/35860.html</wfw:comment><comments>http://www.cnitblog.com/asfman/articles/35860.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/asfman/comments/commentRss/35860.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/asfman/services/trackbacks/35860.html</trackback:ping><description><![CDATA[<a href="http://blog.csdn.net/btbtd/archive/2007/01/04/1473710.aspx">http://blog.csdn.net/btbtd/archive/2007/01/04/1473710.aspx</a><br>说明:<br>&nbsp;其实这个程序只是从某人写的一个VBScript程序改写成 Jscript 而已, 可以说不是我写的, 只是改改而已...<br>&nbsp;至于VBScript版原作者是谁, 我不知道(现在的网络转载大都没署原作来历)...<br>&nbsp;<br>&nbsp;原理嘛, 就是预存0-9的十六进制数据在数组A里, <br>&nbsp;然后生成一个随机数,<br>&nbsp;把随机数存放进 Session 里, 以备进行提交检验,<br>&nbsp;再生成一个数组B, 数组B内容的每个项对应随机数的一个字符.<br>&nbsp;然后循环输出数组A, 以数组B的每一个项内容访问存放十六进制数组A的数据,<br>&nbsp;最后使用 xbm 格式输出图片数据.<br>&nbsp;<br>&nbsp;鄙人弄了一个演示, 共两个文件.<br>&nbsp;test.asp 调用生成随机图片数据.<br>&nbsp;checkcode.asp 生成随机图片数据.<br>&nbsp;<br>&nbsp;下载原格式:<br><span>&nbsp;&nbsp;<a class=sqUrl href="http://files.myopera.com/btbtd/jscript_ss/function/jscript_rnd_num_pic_validator.7z"><u><font color=#0000ff>http://files.myopera.com/btbtd/jscript_ss/function/jscript_rnd_num_pic_validator.7z</font></u></a></span><br><br>&nbsp;目录:<br>&nbsp;1. test.asp 源代码<br>&nbsp;2. checkcode.asp 源代码<br>&nbsp;&nbsp;<br>&nbsp;shawl.qiu <br>&nbsp;2007-01-04<br><span>&nbsp;<a class=sqUrl href="http://blog.csdn.net/btbtd"><u><font color=#0000ff>http://blog.csdn.net/btbtd</font></u></a></span><br>&nbsp;<br>&nbsp;1. test.asp 源代码
<div class=sqDiv>
<ol>
    <li><span><span><span><span>&lt;%@</span></span></span></span><span style="COLOR: #0000ff">LANGUAGE</span><span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000">"JAVASCRIPT"&nbsp;</span><span style="COLOR: #0000ff">CODEPAGE</span><span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000">"65001"%&gt;</span>
    <li>&lt;!<span style="COLOR: #ff0000">DOCTYPE</span>&nbsp;<span style="COLOR: #0000ff">html</span>&nbsp;<span style="COLOR: #0000ff">PUBLIC</span>&nbsp;"-//W3C//DTD&nbsp;<span style="COLOR: #0000ff">XHTML</span>&nbsp;<span style="COLOR: #0000ff">1.0</span>&nbsp;<span style="COLOR: #0000ff">Transitional//EN</span>"&nbsp;"<span style="COLOR: #ff00ff"><span><a class=sqUrl href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><u><font color=#0000ff>http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</font></u></a></span></span>"&gt;
    <li>&lt;<span style="COLOR: #ff0000">html&nbsp;</span><span style="COLOR: #0000ff">xmlns</span>="<span style="COLOR: #ff00ff"><span><a class=sqUrl href="http://www.w3.org/1999/xhtml"><u><font color=#0000ff>http://www.w3.org/1999/xhtml</font></u></a></span></span>"&gt;
    <li>&lt;<span style="COLOR: #ff0000">head</span>&gt;
    <li>&lt;<span style="COLOR: #ff0000"><span><span><span><span>meta&nbsp;http-</span></span></span></span></span><span style="COLOR: #0000ff">equiv</span>="<span style="COLOR: #ff00ff">Content-Type</span>"&nbsp;<span style="COLOR: #0000ff">content</span>="<span style="COLOR: #ff00ff">text/html;&nbsp;</span><span style="COLOR: #0000ff">charset</span>=utf-8"&nbsp;/&gt;
    <li>&lt;<span style="COLOR: #ff0000">title</span>&gt;shawl.qiu&nbsp;template&lt;/<span style="COLOR: #ff0000">title</span>&gt;
    <li>&lt;/<span style="COLOR: #ff0000">head</span>&gt;
    <li>&lt;<span style="COLOR: #ff0000">body</span>&gt;
    <li>&lt;%
    <li>&nbsp;<span style="FONT-WEIGHT: 700">var</span>&nbsp;<span style="COLOR: #0000ff">sCk</span><span style="COLOR: #ffa500">=</span><font color=#0000ff><span style="COLOR: #ff0000">Request</span>.QueryString(<span style="COLOR: #ff00ff">'id'</span>)</font>+'';
    <li>&nbsp;<span style="FONT-WEIGHT: 700">switch</span>(sCk){
    <li>&nbsp;<span style="FONT-WEIGHT: 700">case</span>&nbsp;'check':
    <li>&nbsp;&nbsp;<font color=#0000ff><span style="COLOR: #ff0000">Response</span>.<span style="COLOR: #0000ff">write</span>(<span style="COLOR: #ff00ff">"Session('checkcode'</span>):&nbsp;"+Session(<span style="COLOR: #ff00ff">'checkcode'</span>))</font>;
    <li>&nbsp;&nbsp;<font color=#0000ff><span style="COLOR: #ff0000">Response</span>.<span style="COLOR: #0000ff">write</span>(<span style="COLOR: #ff00ff">"&lt;<span style="COLOR: #ff0000">br</span>/&gt;<span style="COLOR: #ff0000">Request</span>.Form('checkcode'</span>):&nbsp;"+<span style="COLOR: #ff0000">Request</span>.Form(<span style="COLOR: #ff00ff">'checkcode'</span>))</font>;
    <li>&nbsp;&nbsp;<span style="FONT-WEIGHT: 700">break</span>;
    <li>&nbsp;<span style="FONT-WEIGHT: 700">default</span>:
    <li>%&gt;
    <li>&lt;<span style="COLOR: #ff0000">img&nbsp;</span><span style="COLOR: #0000ff">src</span>='<span style="COLOR: #ff00ff">checkcode.asp</span>'&nbsp;/&gt;
    <li>&lt;<span style="COLOR: #ff0000">form&nbsp;</span><span style="COLOR: #0000ff">action</span>='<span style="COLOR: #ff00ff">?</span><span style="COLOR: #0000ff">id</span>=check'&nbsp;<span style="COLOR: #0000ff">method</span>='<span style="COLOR: #ff00ff">post</span>'&gt;
    <li>&nbsp;the&nbsp;code:&lt;<span style="COLOR: #ff0000">input&nbsp;</span><span style="COLOR: #0000ff">type</span>='<span style="COLOR: #ff00ff">text</span>'&nbsp;<span style="COLOR: #0000ff">size</span>='<span style="COLOR: #ff00ff">4</span>'&nbsp;<span style="COLOR: #0000ff">name</span>='<span style="COLOR: #ff00ff">checkcode</span>'/&gt;
    <li>&nbsp;&lt;<span style="COLOR: #ff0000">input&nbsp;</span><span style="COLOR: #0000ff">type</span>='<span style="COLOR: #ff00ff">submit</span>'&nbsp;/&gt;&nbsp;&lt;input&nbsp;<span style="COLOR: #0000ff">type</span>='<span style="COLOR: #ff00ff">reset</span>'&nbsp;/&gt;
    <li>&lt;/<span style="COLOR: #ff0000">form</span>&gt;
    <li>&lt;%
    <li>&nbsp;}
    <li>%&gt;
    <li>&lt;/<span style="COLOR: #ff0000">body</span>&gt;
    <li>&lt;/<span style="COLOR: #ff0000">html</span>&gt;</li>
</ol>
</div>
&nbsp;2. checkcode.asp 源代码
<div class=sqDiv>
<ol>
    <li><span><span><span><span>&lt;%@</span></span></span></span><span style="COLOR: #0000ff">LANGUAGE</span><span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000">"JAVASCRIPT"&nbsp;</span><span style="COLOR: #0000ff">CODEPAGE</span><span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000">"65001"%&gt;</span>
    <li>&lt;%
    <li>&nbsp;checkcode(1000,9999,'checkcode');
    <li>&nbsp;&nbsp;<span style="FONT-WEIGHT: 700">function</span>&nbsp;checkcode(nStart,&nbsp;nOver,&nbsp;sSession){
    <li>&nbsp;&nbsp;<span style="FONT-WEIGHT: 700">if</span>(!nStart)&nbsp;<span style="COLOR: #0000ff">nStart</span><span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000">1000;</span>
    <li>&nbsp;&nbsp;<span style="FONT-WEIGHT: 700">if</span>(!nOver)&nbsp;<span style="COLOR: #0000ff">nOver</span><span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000">9999;</span>
    <li>&nbsp;&nbsp;<span style="FONT-WEIGHT: 700">if</span>(!sSession)&nbsp;<span style="COLOR: #0000ff">sSession</span><span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000">'checkcode';</span>
    <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="FONT-WEIGHT: 700">var</span>&nbsp;<span style="COLOR: #0000ff">ar</span><span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000">[<span style="COLOR: #ff00ff">10</span>];</span>
    <li>&nbsp;&nbsp;&nbsp;//<span style="COLOR: #cccccc">0</span>
    <li>&nbsp;&nbsp;&nbsp;<span style="COLOR: #0000ff">ar[<span style="COLOR: #ff00ff">0</span>]</span><span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000"><span style="FONT-WEIGHT: 700">new</span>&nbsp;<span style="FONT-WEIGHT: 700">Array</span>(<span style="COLOR: #ff00ff">'0x3c',&nbsp;'0x66',&nbsp;'0xc3',&nbsp;'0xc3',&nbsp;'0xc3',&nbsp;'0xc3',&nbsp;'0xc3',&nbsp;'0xc3',&nbsp;'0x66',&nbsp;'0x3c'</span>);</span>
    <li>&nbsp;&nbsp;&nbsp;//<span style="COLOR: #cccccc">1</span>
    <li>&nbsp;&nbsp;&nbsp;<span style="COLOR: #0000ff">ar[<span style="COLOR: #ff00ff">1</span>]</span><span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000"><span style="FONT-WEIGHT: 700">new</span>&nbsp;<span style="FONT-WEIGHT: 700">Array</span>(<span style="COLOR: #ff00ff">'0x18',&nbsp;'0x1c',&nbsp;'0x18',&nbsp;'0x18',&nbsp;'0x18',&nbsp;'0x18',&nbsp;'0x18',&nbsp;'0x18',&nbsp;'0x18',&nbsp;'0x7e'</span>);</span>
    <li>&nbsp;&nbsp;&nbsp;//<span style="COLOR: #cccccc">2</span>
    <li>&nbsp;&nbsp;&nbsp;<span style="COLOR: #0000ff">ar[<span style="COLOR: #ff00ff">2</span>]</span><span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000"><span style="FONT-WEIGHT: 700">new</span>&nbsp;<span style="FONT-WEIGHT: 700">Array</span>(<span style="COLOR: #ff00ff">'0x3c',&nbsp;'0x66',&nbsp;'0x60',&nbsp;'0x60',&nbsp;'0x30',&nbsp;'0x18',&nbsp;'0x0c',&nbsp;'0x06',&nbsp;'0x06',&nbsp;'0x7e'</span>);</span>
    <li>&nbsp;&nbsp;&nbsp;//<span style="COLOR: #cccccc">3</span>
    <li>&nbsp;&nbsp;&nbsp;<span style="COLOR: #0000ff">ar[<span style="COLOR: #ff00ff">3</span>]</span><span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000"><span style="FONT-WEIGHT: 700">new</span>&nbsp;<span style="FONT-WEIGHT: 700">Array</span>(<span style="COLOR: #ff00ff">'0x3c',&nbsp;'0x66',&nbsp;'0xc0',&nbsp;'0x60',&nbsp;'0x1c',&nbsp;'0x60',&nbsp;'0xc0',&nbsp;'0xc0',&nbsp;'0x66',&nbsp;'0x38'</span>);</span>
    <li>&nbsp;&nbsp;&nbsp;//<span style="COLOR: #cccccc">4</span>
    <li>&nbsp;&nbsp;&nbsp;<span style="COLOR: #0000ff">ar[<span style="COLOR: #ff00ff">4</span>]</span><span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000"><span style="FONT-WEIGHT: 700">new</span>&nbsp;<span style="FONT-WEIGHT: 700">Array</span>(<span style="COLOR: #ff00ff">'0x38',&nbsp;'0x3c',&nbsp;'0x36',&nbsp;'0x33',&nbsp;'0x33',&nbsp;'0x33',&nbsp;'0xff',&nbsp;'0x30',&nbsp;'0x30',&nbsp;'0xfe'</span>);</span>
    <li>&nbsp;&nbsp;&nbsp;//<span style="COLOR: #cccccc">5</span>
    <li>&nbsp;&nbsp;&nbsp;<span style="COLOR: #0000ff">ar[<span style="COLOR: #ff00ff">5</span>]</span><span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000"><span style="FONT-WEIGHT: 700">new</span>&nbsp;<span style="FONT-WEIGHT: 700">Array</span>(<span style="COLOR: #ff00ff">'0xfe',&nbsp;'0xfe',&nbsp;'0x06',&nbsp;'0x06',&nbsp;'0x3e',&nbsp;'0x60',&nbsp;'0xc0',&nbsp;'0xc3',&nbsp;'0x66',&nbsp;'0x3c'</span>);</span>
    <li>&nbsp;&nbsp;&nbsp;//<span style="COLOR: #cccccc">6</span>
    <li>&nbsp;&nbsp;&nbsp;<span style="COLOR: #0000ff">ar[<span style="COLOR: #ff00ff">6</span>]</span><span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000"><span style="FONT-WEIGHT: 700">new</span>&nbsp;<span style="FONT-WEIGHT: 700">Array</span>(<span style="COLOR: #ff00ff">'0x60',&nbsp;'0x30',&nbsp;'0x18',&nbsp;'0x0c',&nbsp;'0x3e',&nbsp;'0x63',&nbsp;'0xc3',&nbsp;'0xc3',&nbsp;'0x66',&nbsp;'0x3c'</span>);</span>
    <li>&nbsp;&nbsp;&nbsp;//<span style="COLOR: #cccccc">7</span>
    <li>&nbsp;&nbsp;&nbsp;<span style="COLOR: #0000ff">ar[<span style="COLOR: #ff00ff">7</span>]</span><span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000"><span style="FONT-WEIGHT: 700">new</span>&nbsp;<span style="FONT-WEIGHT: 700">Array</span>(<span style="COLOR: #ff00ff">'0xff',&nbsp;'0xc0',&nbsp;'0x60',&nbsp;'0x30',&nbsp;'0x18',&nbsp;'0x18',&nbsp;'0x18',&nbsp;'0x18',&nbsp;'0x18',&nbsp;'0x18'</span>);</span>
    <li>&nbsp;&nbsp;&nbsp;//<span style="COLOR: #cccccc">8</span>
    <li>&nbsp;&nbsp;&nbsp;<span style="COLOR: #0000ff">ar[<span style="COLOR: #ff00ff">8</span>]</span><span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000"><span style="FONT-WEIGHT: 700">new</span>&nbsp;<span style="FONT-WEIGHT: 700">Array</span>(<span style="COLOR: #ff00ff">'0x3c',&nbsp;'0x66',&nbsp;'0xc3',&nbsp;'0x66',&nbsp;'0x3c',&nbsp;'0x66',&nbsp;'0xc3',&nbsp;'0xc3',&nbsp;'0x66',&nbsp;'0x3c'</span>);</span>
    <li>&nbsp;&nbsp;&nbsp;//<span style="COLOR: #cccccc">9</span>
    <li>&nbsp;&nbsp;&nbsp;<span style="COLOR: #0000ff">ar[<span style="COLOR: #ff00ff">9</span>]</span><span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000"><span style="FONT-WEIGHT: 700">new</span>&nbsp;<span style="FONT-WEIGHT: 700">Array</span>(<span style="COLOR: #ff00ff">'0x3c',&nbsp;'0x66',&nbsp;'0xc3',&nbsp;'0xc3',&nbsp;'0x66',&nbsp;'0x3c',&nbsp;'0x18',&nbsp;'0x0c',&nbsp;'0x06',&nbsp;'0x03'</span>);</span>
    <li>&nbsp;&nbsp;&nbsp;&nbsp;//<span style="COLOR: #0000ff"><span style="COLOR: #ff0000">Response</span>.Buffer</span>&nbsp;<span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000">&nbsp;<span style="FONT-WEIGHT: 700">false</span>;</span>
    <li>&nbsp;&nbsp;&nbsp;&nbsp;with(<span style="COLOR: #ff0000">Response</span>){
    <li>&nbsp;&nbsp;&nbsp;<span style="COLOR: #0000ff">Expires</span>&nbsp;<span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000">&nbsp;-1&nbsp;;</span>
    <li>&nbsp;&nbsp;&nbsp;AddHeader("Pragma","no-cache")&nbsp;;
    <li>&nbsp;&nbsp;&nbsp;AddHeader("cache-ctrol","no-cache");&nbsp;
    <li>&nbsp;&nbsp;}
    <li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="FONT-WEIGHT: 700">var</span>&nbsp;<span style="COLOR: #0000ff">nNum</span><span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000">fRandomBy(<span style="COLOR: #ff00ff">nStart,nOver</span>)+'';</span>
    <li>&nbsp;&nbsp;Session(sSession)<span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000">nNum;</span>
    <li>&nbsp;&nbsp;&nbsp;&nbsp;//<font color=#0000ff><span style="COLOR: #ff0000">Response</span>.<span style="COLOR: #0000ff">write</span>(<span style="COLOR: #ff00ff">Session(sSession</span>))</font>;
    <li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="FONT-WEIGHT: 700">var</span>&nbsp;<span style="COLOR: #0000ff">arDg</span><span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000">[];</span>
    <li>&nbsp;&nbsp;<span style="FONT-WEIGHT: 700">for</span>(<span style="FONT-WEIGHT: 700">var</span>&nbsp;<span style="COLOR: #0000ff">i</span><span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000">0;&nbsp;i&lt;</span><font color=#0000ff>nNum.length;&nbsp;i++)</font>{
    <li>&nbsp;&nbsp;&nbsp;<span style="COLOR: #0000ff">arDg[<span style="COLOR: #ff00ff">i</span>]</span><span style="COLOR: #ffa500">=</span><font color=#0000ff>nNum.charAt(<span style="COLOR: #ff00ff">i</span>)</font>;
    <li>&nbsp;&nbsp;}
    <li>&nbsp;&nbsp;&nbsp;<span style="FONT-WEIGHT: 700">var</span>&nbsp;<span style="COLOR: #0000ff">sMarker</span><span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000">'\r\n';</span>
    <li>&nbsp;&nbsp;&nbsp;<span style="FONT-WEIGHT: 700">var</span>&nbsp;<span style="COLOR: #0000ff">nWidth</span><span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000">8*arDg.length;</span>
    <li>&nbsp;&nbsp;<span style="FONT-WEIGHT: 700">var</span>&nbsp;<span style="COLOR: #0000ff">nHeight</span><span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000">10;&nbsp;</span>
    <li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="COLOR: #0000ff"><span style="COLOR: #ff0000">Response</span>.ContentType</span>&nbsp;<span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000">&nbsp;"image/x-xbitmap"</span>
    <li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="FONT-WEIGHT: 700">var</span>&nbsp;<span style="COLOR: #0000ff">sImg</span><span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000">'#define&nbsp;counter_width&nbsp;'+nWidth+sMarker+</span>
    <li>&nbsp;&nbsp;&nbsp;&nbsp;'#define&nbsp;counter_height&nbsp;'+nHeight+sMarker+
    <li>&nbsp;&nbsp;&nbsp;&nbsp;'static&nbsp;unsigned&nbsp;char&nbsp;<span style="COLOR: #0000ff">counter_bits[]</span>&nbsp;<span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000">&nbsp;{'+sMarker</span>
    <li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="FONT-WEIGHT: 700">for</span>(<span style="FONT-WEIGHT: 700">var</span>&nbsp;<span style="COLOR: #0000ff">i</span><span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000">0;&nbsp;i&lt;10;&nbsp;i++){</span>
    <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="FONT-WEIGHT: 700">for</span>(<span style="FONT-WEIGHT: 700">var</span>&nbsp;<span style="COLOR: #0000ff">j</span><span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000">0,&nbsp;</span><span style="COLOR: #0000ff">k</span><span style="COLOR: #ffa500">=</span><font color=#0000ff>arDg.length;&nbsp;j&lt;k;&nbsp;j++)</font>{
    <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="COLOR: #0000ff">sImg+</span><span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000">ar[arDg[<span style="COLOR: #ff00ff">j]</span>][<span style="COLOR: #ff00ff">i</span>]+',';</span>
    <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
    <li>&nbsp;&nbsp;&nbsp;&nbsp;}
    <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="COLOR: #0000ff">sImg</span><span style="COLOR: #ffa500">=</span><font color=#0000ff>sImg.replace(<span style="COLOR: #ff00ff">/\,$/,''</span>)</font>;
    <li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="COLOR: #0000ff">sImg+</span><span style="COLOR: #ffa500">=</span><span style="COLOR: #ff0000">'};'+sMarker;</span>
    <li>&nbsp;&nbsp;<font color=#0000ff><span style="COLOR: #ff0000">Response</span>.<span style="COLOR: #0000ff">write</span>(<span style="COLOR: #ff00ff">sImg</span>)</font>;&nbsp;
    <li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="FONT-WEIGHT: 700">function</span>&nbsp;fRandomBy(nUnder,&nbsp;nOver){
    <li>&nbsp;&nbsp;&nbsp;<span style="FONT-WEIGHT: 700">switch</span>(<font color=#0000ff>arguments.length)</font>{
    <li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="FONT-WEIGHT: 700">case</span>&nbsp;1:&nbsp;<span style="FONT-WEIGHT: 700">return</span>&nbsp;parseInt(<font color=#0000ff>Math.random()*nUnder+1)</font>;
    <li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="FONT-WEIGHT: 700">case</span>&nbsp;2:&nbsp;<span style="FONT-WEIGHT: 700">return</span>&nbsp;parseInt(<font color=#0000ff>Math.random()*(<span style="COLOR: #ff00ff">nOver-nUnder+1</span>)&nbsp;+&nbsp;nUnder)</font>;
    <li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="FONT-WEIGHT: 700">default</span>:&nbsp;<span style="FONT-WEIGHT: 700">return</span>&nbsp;0;
    <li>&nbsp;&nbsp;&nbsp;}
    <li>&nbsp;&nbsp;}&nbsp;&nbsp;//<span style="COLOR: #cccccc">&nbsp;shawl.qiu&nbsp;code</span>
    <li>&nbsp;}&nbsp;//<span style="COLOR: #cccccc">&nbsp;end&nbsp;</span><span style="FONT-WEIGHT: 700">function</span>&nbsp;checkcode(nStart,&nbsp;nOver,&nbsp;sSession)&nbsp;
    <li>%&gt;</li>
</ol>
</div>
<img src ="http://www.cnitblog.com/asfman/aggbug/35860.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/asfman/" target="_blank">汪杰</a> 2007-11-04 23:21 <a href="http://www.cnitblog.com/asfman/articles/35860.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>关于留言版的自由回复</title><link>http://www.cnitblog.com/asfman/articles/35793.html</link><dc:creator>汪杰</dc:creator><author>汪杰</author><pubDate>Sat, 03 Nov 2007 17:30:00 GMT</pubDate><guid>http://www.cnitblog.com/asfman/articles/35793.html</guid><wfw:comment>http://www.cnitblog.com/asfman/comments/35793.html</wfw:comment><comments>http://www.cnitblog.com/asfman/articles/35793.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/asfman/comments/commentRss/35793.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/asfman/services/trackbacks/35793.html</trackback:ping><description><![CDATA[<p>&lt;<a href='&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#37;&#64;&#76;&#97;&#110;&#103;&#117;&#97;&#103;&#101;&#61;&#34;&#74;&#97;&#118;&#97;&#115;&#99;&#114;&#105;&#112;&#116;&#34;&#37;'>%@Language="Javascript"%</a>&gt;<br>&lt;html&gt;<br>&lt;head&gt;<br>&lt;style&gt;<br>.replyDiv{<br>border:1px solid #999;<br>}<br>.reply{<br>border:1px solid #ccc;<br>margin:5px;<br>}<br>&lt;/style&gt;<br>&lt;/head&gt;<br>&lt;body&gt;</p>
<p>&lt;%<br>var conn = Server.CreateObject("ADODB.Connection");<br>var connStr = "Provider=Microsoft.Jet.Oledb.4.0;Data Source="+Server.MapPath("asfman.mdb");<br>conn.Open(connStr);</p>
<p>var Rs = Server.CreateObject("ADODB.RecordSet");<br>Rs.Open("select * from messages",conn,1,1);<br>while(!Rs.EOF)<br>{<br>&nbsp;for(var i = 0;i&lt;Rs.Fields.Count;i++)<br>&nbsp;{<br>&nbsp;&nbsp;var temp = "";<br>&nbsp;&nbsp;if(Rs.Fields(i).Name ==&nbsp; "reply")<br>&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;temp = Rs.Fields(i).Value;<br>&nbsp;&nbsp;&nbsp;var arr = temp.match(/[^\f]+/g);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var str = arr.length? "&lt;div class=\"replyDiv\"&gt;":"";<br>&nbsp;&nbsp;&nbsp;for(var j = 0;j&lt;arr.length;j++)<br>&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;str = str +"&lt;div class=\"reply\"&gt;";<br>&nbsp;&nbsp;&nbsp;&nbsp;var arr2 = arr[j].match(/[^\b]+/g);<br>&nbsp;&nbsp;&nbsp;&nbsp;for(var k=0;k&lt;arr2.length;k++)<br>&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;str&nbsp; = str&nbsp; + (arr2[k]+"&lt;br /&gt;");<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;str = str +"&lt;/div&gt;";<br>&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;str = str?(str+"&lt;/div&gt;"):"";<br>&nbsp;&nbsp;}else<br>&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;Response.Write(Rs.Fields(i).Value+"&lt;br /&gt;");<br>&nbsp;&nbsp;}</p>
<p>&nbsp;}<br>&nbsp;Response.Write(str);<br>&nbsp;Rs.MoveNext();<br>}<br>Rs.Close();<br>conn.Close();<br>conn = null;<br>Rs = null;<br>%&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;<br><br>&lt;<a href='&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#37;&#64;&#76;&#97;&#110;&#103;&#117;&#97;&#103;&#101;&#61;&#34;&#74;&#97;&#118;&#97;&#115;&#99;&#114;&#105;&#112;&#116;&#34;&#37;'>%@Language="Javascript"%</a>&gt;<br>&lt;%<br>var conn = Server.CreateObject("ADODB.Connection");<br>var connStr = "Provider=Microsoft.Jet.Oledb.4.0;Data Source="+Server.MapPath("asfman.mdb");<br>conn.Open(connStr);<br>var sql="insert into messages(name,content,ipAddress,reply,_time) values('asfman2','test','122','\f汪杰\b这是一个测试\b127.0.0.1\b2007-11-4\fasfman\bjust a test\b127.0.0.1\b2007-11-4',now())";<br>conn.Execute(sql);<br>Response.Write("ok");<br>%&gt;</p>
<img src ="http://www.cnitblog.com/asfman/aggbug/35793.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/asfman/" target="_blank">汪杰</a> 2007-11-04 01:30 <a href="http://www.cnitblog.com/asfman/articles/35793.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>setRquestHeader使用实例1</title><link>http://www.cnitblog.com/asfman/articles/35281.html</link><dc:creator>汪杰</dc:creator><author>汪杰</author><pubDate>Wed, 24 Oct 2007 07:41:00 GMT</pubDate><guid>http://www.cnitblog.com/asfman/articles/35281.html</guid><wfw:comment>http://www.cnitblog.com/asfman/comments/35281.html</wfw:comment><comments>http://www.cnitblog.com/asfman/articles/35281.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/asfman/comments/commentRss/35281.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/asfman/services/trackbacks/35281.html</trackback:ping><description><![CDATA[<p>&lt;<a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#37;&#64;&#76;&#97;&#110;&#103;&#117;&#97;&#103;&#101;">%@Language</a> = "Javascript" %&gt;<br>&lt;%<br>//Response.Write(Request.ServerVariables("http_accept"));<br>&nbsp;var a=Request.QueryString('a').Item;<br>&nbsp;var b=Request.QueryString('b').Item;<br>&nbsp;if(!a){total="";}<br>&nbsp;else{<br>&nbsp;var total=a-0+(b-0);}<br>&nbsp;acc=Request.ServerVariables('HTTP_ACCEPT')+''<br>&nbsp;if (acc.indexOf('asfman')!=-1) {<br>&nbsp; Response.Write(total)<br>&nbsp;} else {<br>%&gt;<br>&lt;script&gt;<br>var xmlhttp = new XMLHttpRequest();<br>&nbsp;function calc() {<br>&nbsp; frm=document.forms[0]<br>&nbsp; url="?a="+frm.elements['a'].value+"&amp;b="+frm.elements['b'].value<br>&nbsp; xmlhttp.open("GET",url,true);<br>&nbsp; xmlhttp.onreadystatechange=function() {<br>&nbsp;&nbsp; if (xmlhttp.readyState==4) {<br>&nbsp;&nbsp;&nbsp; document.forms[0].elements['total'].value=xmlhttp.responseText<br>&nbsp;&nbsp; }<br>&nbsp; }<br>&nbsp;xmlhttp.setRequestHeader('Accept','asfman');<br>&nbsp;xmlhttp.send()<br>&nbsp;return false<br>}<br>&lt;/script&gt;<br>&lt;form action="" method="get" onsubmit="return calc()"&gt;<br>&lt;input type=text name=a value="&lt;%=a%&gt;"&gt; + &lt;input type=text name=b value="&lt;%=b%&gt;"&gt;<br>&nbsp;= &lt;input type=text name=total value="&lt;%=total%&gt;"&gt;<br>&lt;input type=submit value="Calculate"&gt;<br>&lt;/form&gt;<br>&lt;%<br>}<br>%&gt;</p>
<img src ="http://www.cnitblog.com/asfman/aggbug/35281.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/asfman/" target="_blank">汪杰</a> 2007-10-24 15:41 <a href="http://www.cnitblog.com/asfman/articles/35281.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>create xml file</title><link>http://www.cnitblog.com/asfman/articles/31359.html</link><dc:creator>汪杰</dc:creator><author>汪杰</author><pubDate>Mon, 06 Aug 2007 15:05:00 GMT</pubDate><guid>http://www.cnitblog.com/asfman/articles/31359.html</guid><wfw:comment>http://www.cnitblog.com/asfman/comments/31359.html</wfw:comment><comments>http://www.cnitblog.com/asfman/articles/31359.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/asfman/comments/commentRss/31359.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/asfman/services/trackbacks/31359.html</trackback:ping><description><![CDATA[&lt;%@ Language="Javascript" %&gt;<br>&lt;%<br>var xmlDoc=new ActiveXObject("Microsoft.XMLDOM");<br>var root=xmlDoc.createElement("information");<br>xmlDoc.appendChild(root);<br>for(var i=1;i&lt;=Request.Form.Count;i++)<br>{<br>&nbsp;if(Request.Form.Key(i)!="sub")<br>&nbsp;{<br>&nbsp; for(var j=1;j&lt;=Request.Form(i).Count;j++)<br>&nbsp; {<br>&nbsp;&nbsp; var field=xmlDoc.createElement("field");<br>&nbsp;&nbsp; var attID=xmlDoc.createAttribute("ID");<br>&nbsp;&nbsp; attID.text=Request.Form.Key(i);<br>&nbsp;&nbsp; field.setAttributeNode(attID);<br>&nbsp;&nbsp; var value=xmlDoc.createElement("value");<br>&nbsp;&nbsp; value.text=Request.Form(i)(j);<br>&nbsp;&nbsp; field.appendChild(value);<br>&nbsp;&nbsp; root.appendChild(field);<br>&nbsp; }<br>&nbsp;}<br>}<br>var p=xmlDoc.createProcessingInstruction("xml","version='1.0' encoding='gb2312'");<br>xmlDoc.insertBefore(p,root);<br>xmlDoc.save(Server.Mappath("information.xml"));<br>Response.Write("saved information.xml successfully!");<br>%&gt;
<img src ="http://www.cnitblog.com/asfman/aggbug/31359.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/asfman/" target="_blank">汪杰</a> 2007-08-06 23:05 <a href="http://www.cnitblog.com/asfman/articles/31359.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>OLEDB连接方法</title><link>http://www.cnitblog.com/asfman/articles/31271.html</link><dc:creator>汪杰</dc:creator><author>汪杰</author><pubDate>Sun, 05 Aug 2007 10:12:00 GMT</pubDate><guid>http://www.cnitblog.com/asfman/articles/31271.html</guid><wfw:comment>http://www.cnitblog.com/asfman/comments/31271.html</wfw:comment><comments>http://www.cnitblog.com/asfman/articles/31271.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cnitblog.com/asfman/comments/commentRss/31271.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/asfman/services/trackbacks/31271.html</trackback:ping><description><![CDATA[ASP中连接数据库(ADODB对象)：<br><br>一、OLEDB连接方法<br><br>1.OLE DB Provider for AS/400 <br>connstr = "Provider=IBMDA400;" Data source=myAS400;User Id=myUsername;Password=myPassword;"<br><br>2.OLE DB Provider for Active Directory Service <br>connstr = "Provider=ADSDSOObject;User Id=myUsername;Password=myPassword;"<br><br>3.OLE DB Provider for DB2 <br>connstr = "Provider=DB2OLEDB;Network Transport Library=TCPIP;Network Address=MyServer;Package Collection=MyPackage;Host CCSID=1142Initial Catalog=MyDB;User ID=MyUsername;Password=MyPassword;"<br><br>4.OLE DB Provider for Index Server <br>connstr = "Provider=msidxs;Data source=MyCatalog;"<br><br>5.OLE DB Provider for Internet Publishing <br>connstr = "Provider=MSDAIPP.DSO;Data Source=url;User Id=myUsername;Password=myPassword;" <br><br>6.OLE DB Provider for Microsoft Jet(access-this way will be best) <br>connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=dbpath;User Id=admin;Password=;"<br><br>7.OLE DB Provider for Microsoft Jet(Excel)<br>connstr = Provider=Microsoft.Jet.OLEDB.4.0;Data Source=dbpath;Extended Properties=""Excel 8.0;HDR=Yes;"";" <br><br>["HDR=Yes" means that there is a header row in the cell range (or named range), so the provider will not include the first row of the selection into the recordset. If "HDR=No", then the provider will include　the first row of the cell range (or named ranged) into the recordset]<br><br>9.OLE DB Provider for Microsoft Jet(textfile)<br>connstr = Provider=Microsoft.Jet.OLEDB.4.0;Data Source=dbpath;Extended Properties=""text;HDR=Yes;FMT=Delimited;"";" <br><br>10.OLE DB Provider for ODBC Databases(access)<br>connstr = "Provider=MSDASQL;Driver={Microsoft Access Driver (*.mdb)};Dbq=dbpath;Uid=myUsername;Pwd=myPassword;"<br><br>11.OLE DB Provider for ODBC Databases(SQL) <br>connstr = "Provider=MSDASQL;Driver={SQL Server};Server=myServerName;Database=myDatabaseName;Uid=myUsername;"Pwd=myPassword;"<br><br>12.OLE DB Provider for Oracle (from Microsoft) <br>connstr = "Provider=msdaora;Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;"<br><br>13.OLE DB Provider for Simple Provider <br>connstr = "Provider=MSDAOSP;Data Source=MSXML2.DSOControl.2.6;"<br><br>14.OLE DB Provider for SQL Server <br>"Provider=sqloledb;Data Source=myServerName;Initial Catalog=myDatabaseName;User Id=myUsername;Password=myPassword;"<br><br>[if connection with ip address]<br>connstr = "Provider=sqloledb;Data Source=xxx.xxx.xxx.xxx,1433;Network Library=DBMSSOCN;Initial Catalog=myDatabaseName;User ID=myUsername;Password=myPassword;" <br><br>[1433　为SQL数据库默认接口]<br>
<img src ="http://www.cnitblog.com/asfman/aggbug/31271.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/asfman/" target="_blank">汪杰</a> 2007-08-05 18:12 <a href="http://www.cnitblog.com/asfman/articles/31271.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>js send email class from wscript.cn</title><link>http://www.cnitblog.com/asfman/articles/28575.html</link><dc:creator>汪杰</dc:creator><author>汪杰</author><pubDate>Sat, 16 Jun 2007 07:30:00 GMT</pubDate><guid>http://www.cnitblog.com/asfman/articles/28575.html</guid><wfw:comment>http://www.cnitblog.com/asfman/comments/28575.html</wfw:comment><comments>http://www.cnitblog.com/asfman/articles/28575.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/asfman/comments/commentRss/28575.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/asfman/services/trackbacks/28575.html</trackback:ping><description><![CDATA[&lt;%@Language="JScript" codepage="936"%&gt;<br>&lt;%<br>function aspMailClass(){<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var fromMail = "test@test.com";&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;var fromServ = "smtp.test.com";&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//smtp服务器<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var fromProt = 25;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//smtp服务器端口<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var fromName = "无忧脚本";&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;var fromUser = "51js";&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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;var fromPass = "51js";&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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;this.sendMail = function(toEmail, toTitle, toBody){<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try {<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;var byMail = new ActiveXObject("CDO.Configuration");<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;var fields = byMail.Fields;<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;var cfgUrl = "http://schemas.microsoft.com/cdo/configuration/";<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;fields(cfgUrl + "sendusing") = 2;&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fields(cfgUrl + "smtpserver") = fromServ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//smtp服务器<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;fields(cfgUrl + "smtpserverport") = fromProt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//smtp服务器端口<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;fields(cfgUrl + "smtpaccountname") = fromMail;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//发件人帐号名称<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;fields(cfgUrl + "sendemailaddress") = fromMail;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//发件人的信箱<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;fields(cfgUrl + "smtpauthenticate") = 1;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//是否认证<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;fields(cfgUrl + "sendusername") = fromUser;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//发件人邮箱用户名<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;fields(cfgUrl + "sendpassword") = fromPass;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//发件人邮箱密码<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;fields.Update();<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;var oMail = new ActiveXObject("CDO.Message");<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;with(oMail){<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;&nbsp;To = toEmail;<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;&nbsp;Subject = toTitle;<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;&nbsp;HTMLBody = toBody;<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;&nbsp;From = fromName + "&lt;" + fromMail + "&gt;";<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;&nbsp;Configuration = byMail;<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;&nbsp;Mimeformatted = 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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AutoGenerateTextBody = 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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fields.Update();<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;&nbsp;HTMLBodyPart.Charset = "gb2312";<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;&nbsp;Send();<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;}<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;oMail = null;<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;fields = null;<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;byMail = null;<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;return this.result = "邮件成功发送至" + toEmail + "！";<br>&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;&nbsp;catch(e) {<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;return this.result = "发送至" + toEmail + "的邮件发送失败！失败原因：" + e.description;<br>&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;}<br>}<br><br>//实例<br>var toMail = new aspMailClass();<br>toMail.sendMail("xxx@xxx.com", "欢迎来到无忧脚本", "主题&lt;font color=red&gt;主题2&lt;/font&gt;");<br>Response.Write(toMail.result);<br>toMail = null;<br>%&gt;
<img src ="http://www.cnitblog.com/asfman/aggbug/28575.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/asfman/" target="_blank">汪杰</a> 2007-06-16 15:30 <a href="http://www.cnitblog.com/asfman/articles/28575.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>关于xmlhttp.responseText</title><link>http://www.cnitblog.com/asfman/articles/28368.html</link><dc:creator>汪杰</dc:creator><author>汪杰</author><pubDate>Tue, 12 Jun 2007 14:47:00 GMT</pubDate><guid>http://www.cnitblog.com/asfman/articles/28368.html</guid><wfw:comment>http://www.cnitblog.com/asfman/comments/28368.html</wfw:comment><comments>http://www.cnitblog.com/asfman/articles/28368.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/asfman/comments/commentRss/28368.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/asfman/services/trackbacks/28368.html</trackback:ping><description><![CDATA[<p>只要子读取文件设置有Response.Charset就可以正常读取，如果没有设置的话，默认是按utf-8读取，所有对于ansi文件我们最好设置Response.Charset，从来可以避免自己去解码responseBody</p>
<img src ="http://www.cnitblog.com/asfman/aggbug/28368.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/asfman/" target="_blank">汪杰</a> 2007-06-12 22:47 <a href="http://www.cnitblog.com/asfman/articles/28368.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>关于sct编写、调用需要注意的</title><link>http://www.cnitblog.com/asfman/articles/28151.html</link><dc:creator>汪杰</dc:creator><author>汪杰</author><pubDate>Thu, 07 Jun 2007 02:06:00 GMT</pubDate><guid>http://www.cnitblog.com/asfman/articles/28151.html</guid><wfw:comment>http://www.cnitblog.com/asfman/comments/28151.html</wfw:comment><comments>http://www.cnitblog.com/asfman/articles/28151.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/asfman/comments/commentRss/28151.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/asfman/services/trackbacks/28151.html</trackback:ping><description><![CDATA[用Jscript写sct:<br>method指定的方法名必须与脚本的名字相同，符合js是区分大小写的。<br>用VBScript谢sct:<br>method指定的方法名不区分大小写。<br>note:<br>一旦指定了方法名，调用的时候就要用这个方法名，区分大小写<br>eg:<br>&lt;method name="test" /&gt;<br>无论js还是vbs写，调用的时候都得o.test()，用o.Test等等将出错 
<img src ="http://www.cnitblog.com/asfman/aggbug/28151.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/asfman/" target="_blank">汪杰</a> 2007-06-07 10:06 <a href="http://www.cnitblog.com/asfman/articles/28151.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>http协议简介</title><link>http://www.cnitblog.com/asfman/articles/27781.html</link><dc:creator>汪杰</dc:creator><author>汪杰</author><pubDate>Wed, 30 May 2007 05:44:00 GMT</pubDate><guid>http://www.cnitblog.com/asfman/articles/27781.html</guid><wfw:comment>http://www.cnitblog.com/asfman/comments/27781.html</wfw:comment><comments>http://www.cnitblog.com/asfman/articles/27781.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/asfman/comments/commentRss/27781.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/asfman/services/trackbacks/27781.html</trackback:ping><description><![CDATA[<p><strong>什么是HTTP协议</strong><br><br>HTTP 协议定义服务器端和客户端之间文件传输的沟通方式。目前HTTP协议的版本是Http1.1。<a href="http://www.rfc-editor.org/rfc/rfc2616.txt"><u><font color=#0000ff>RFC 2616</font></u></a>描述了HTTP协议的具体信息。 <br><br>这个协议已经成为浏览器和Web站点之间的标准。</p>
<p><span class=style1>当我上网的时候底层是如何进行交互的？</span><br><br>当访问者点击一个超链接的时候，将会给浏览器提交一个URL地址。通过这个URL地址，浏览器便知道去链接那个网站并去取得具体的页面文件（也可能是一张图片，一个pdf文件）。<br><br>HTTP工作的基础就是，连接一个服务器并开始传输文件到浏览器。</p>
<p><strong>HTTP传输的基本过程</strong><br><br><span class=style2>在http传输的过程中，被称为客户端的请求者向服务器请求一个文件。<br><br>最基本的过程是:<br>1 客户端连接一个主机；<br>2 服务器接收连接, <br>3 客户端请求一个文件, <br>4 服务器发送一个应答.</span> </p>
<p><strong>实例</strong><br><br><span class=style2>我们看几个典型的过程<br><br>首先，我们想访问本页面。在浏览器上敲入&#8220;http://www.maketop.net/resource/rs_041112_02.php&#8221;.浏览器将连接www.maketop.net然后发送：</span><br><br>&gt;&gt; GET /resource/rs_041112_02.php Http1.1 <br>&gt;&gt; Host: www.maketop.net<br>&gt;&gt; Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, <br>&gt;&gt; Accept-Language: en <br>&gt;&gt; Accept-Encoding: gzip, deflate <br>&gt;&gt; User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Firefox/0.10<br>&gt;&gt; Connection: Keep-Alive <br>&gt;&gt; <br><br><span class=style2>解释：浏览器请求页面&#8220;/resource/rs_041112_02.php&#8221;。并使用HTTP1.1协 议。并告诉服务器你的浏览器是Firefox0.10。操作系统是Windows XP。 浏览器希望保持与www.maketop.net之间的连接，并请求获得多的文件，包括网页中的图片。翻译成语言上面是：</span></p>
<p>&gt;&gt; 用HTTP1.1协议获得 /resource/rs_041112_02.php<br>&gt;&gt; 访问的主机是: www.maketop.net<br>&gt;&gt; 接收的文件包括了: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, <br>&gt;&gt; 使用的语言是: en <br>&gt;&gt; 接收的编码方式（浏览器能够解释的）是: gzip, deflate <br>&gt;&gt; 用户的浏览器信息:Windows XP的操作系统 Firefox/0.10的浏览器<br>&gt;&gt; 保持连接: 还要去图片<br>&gt;&gt; </p>
<p><a name=httpsamples><span class=style2><br><br>www.maketop.net的服务器发出响应：</span><br><br>&lt;&lt; HTTP/1.1 200 OK <br>&lt;&lt; Date: Mon, 12 Mar 2004 19:12:16 GMT <br>&lt;&lt; Server: Apache/1.3.31 (Unix) mod_throttle/3.1.2<br>&lt;&lt; Last-Modified: Fri, 22 Sep 2004 14:16:18 <br>&lt;&lt; ETag: "dd7b6e-d29-39cb69b2" <br>&lt;&lt; Accept-Ranges: bytes <br>&lt;&lt; Content-Length: 3369 <br>&lt;&lt; Connection: close <br>&lt;&lt; Content-Type: text/html <br>&lt;&lt; <br>&lt;&lt; File content goes here <br><br><span class=style2>浏览器并从服务器的响应中获得服务器的信息：比如运行在Apache。</span><br><span class=style2>上面翻译成翻译成语言上面就是</span></a></p>
<a name=httpsamples></a><a name=httpsamples>&lt;&lt; HTTP1.1协议方式有效<br>&lt;&lt; 当前时间是: Mon, 12 Mar 2004 19:12:16 GMT <br>&lt;&lt; 服务器是: Apache/1.3.31 (Unix) mod_throttle/3.1.2<br>&lt;&lt; 最后一次修改: Fri, 22 Sep 2004 14:16:18 <br>&lt;&lt; ETag: "dd7b6e-d29-39cb69b2" <br>&lt;&lt; Accept-Ranges: bytes <br>&lt;&lt; Content-Length: 3369 <br>&lt;&lt; Connection: close <br>&lt;&lt; Content-Type: text/html <br>&lt;&lt; <br>&lt;&lt; File content goes here <br><br>上面例子就是最简单的交互过程描述，需要对HTTP协议中具体的命令了解，就需要阅读</a><a href="http://www.rfc-editor.org/rfc/rfc2616.txt"><u><font color=#0000ff>RFC 2616</font></u></a> <br>本页网址: http://sohotx.com/mzk/index.php/1007/ArticleContent/429.html 
<img src ="http://www.cnitblog.com/asfman/aggbug/27781.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/asfman/" target="_blank">汪杰</a> 2007-05-30 13:44 <a href="http://www.cnitblog.com/asfman/articles/27781.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>JSP学习</title><link>http://www.cnitblog.com/asfman/articles/27688.html</link><dc:creator>汪杰</dc:creator><author>汪杰</author><pubDate>Mon, 28 May 2007 03:05:00 GMT</pubDate><guid>http://www.cnitblog.com/asfman/articles/27688.html</guid><wfw:comment>http://www.cnitblog.com/asfman/comments/27688.html</wfw:comment><comments>http://www.cnitblog.com/asfman/articles/27688.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cnitblog.com/asfman/comments/commentRss/27688.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/asfman/services/trackbacks/27688.html</trackback:ping><description><![CDATA[如何成为一个成功的Jsp程序员？一个普通的错误是把JSP当作简化的Java。它不是，（事实上， JSP是简化的 servlets。）程序员通常试着没有学习要求的支持技巧而直接学习JSP。JSP 是一个衔接技术，并且成功地连接你需要理解的另外的技术。如果你已经知道Java，HTML和Javascript，这意味着JSP将确实是简单的。 <br><br><br>　　需要成为一个成功的 JSP 程序员可以参考这个时间表。请注意下列： <br><br>　　*忽略你已经熟悉的步骤。 <br>　　*训练的时间只是代表学习好足够的基础时间，这样才能转移到下一步。 <br><br>　　１、建立并且理解你的Web Server。 <br>　　因为Apache 是免费的并且在大多数平台上工作，为训练目的推荐 Apache。 <br>　　安装时间：2 天。 <br><br>　　２、保证你理解 HTML / XHTML 。 <br>　　你将需要了解html基础, 特别是 HTML 布局中的table的使用。XHTML 不久将代替 HTML ，学习 XHTML 的基础是一个好主意。许多程序员通过 HTML IDE 学习 HTML ( 集成开发环境 ) 。因为大多数 HTML IDE产生混乱的HTMl语法，所以花时间学习手工写作html是很有必要的。因 为你将会使用 JSP 和 HTML 混合编程，精通HTML语法是重要的。所以，你必须能流利地写 HTML 。 <br>　　训练时间：2 ～ 4 个星期。 <br><br>　　３、开始学习 Java 。 <br>　　开始学习 Java 1.4 理解 Java 基础是很重要的。不用担心学习Swing或 Java 的图形方面，因为在JSP 中你不会使用这些特征。集中精力 在 Java 工作的细节，学习 Java 的逻辑，也在 Java Bean上花时间。学习Applet是好的, 但是就象Swing， JSP 的大多数应用将不使用小程 序。 <br>　　训练时间：3 ～ 6 个星期。 <br><br>　　4、学习 JavaScript <br>　　学习怎么将 JavaScript在HTML中验证输入的Form元素。也学习 JavaScript怎么能在一 HTML 页以内修改Form的元素。最后要求你能从一HTML 页内的事件中触发 JavaScript Function。 <br>　　训练时间：一～ 2 个星期。 <br><br>　　5、学习并且理解你的Web Server的更好的细节。 <br>　　熟悉Web Server的特征，这是很重要的。 <br>　　训练时间：2 天。 <br><br>　　6、建立你的 JSP Server <br>　　我推荐以Tomcat开始。它可以很好地运行JSP程序。当你不能在生产使用Tomcat时，学习尽可能多的知识以便于更好的运行程序。另外, 许多 JSP 程序员使用Tomcat。因此当你遇到一个问题时，你将容易发现帮助。 <br>　　安装时间：1～ 2 天。 <br><br>　　7、开始学习 JSP 。 <br>　　基本的 JSP 学习通过的步骤 1到步骤6可以完成, 然后使用 JSP 对象和脚本写 JSP 程序来联系。学习 JSP 的另外一个方面可以学习怎么创建一个分布式的应用程序。 <br>　　训练时间：4 ～ 6 个星期。 <br><br>　　8、学习更多的 JSP server。 <br>　　没有关于更多的 JSP Server当然也可以运行jsp程序。然而, 许多 JSP server都由自己特殊的特征，可以让你更好的理解你的JSP 工程。 <br>　　学习更多的Jsp server如何处理jsp程序是有必要的。同样也可以优化你的 JSP 应用程序，并且使之运行得更快而不出任何问题。 <br>　　训练时间：2 ～ 7 天。 <br><br>　　9、 学习 JDBC 。 <br>　　JSP 大多数应用将使用数据库，JDBC 被用于数据库连接。经常忽略的一个事实就是，每个 JDBC Driver 所支持的东西是相当不同的。了 解并熟悉在jsp工程上被使用的 JDBC driver的细节是很重要的。（有时这部分的学习被包含在前面 Java 或JSP的学习中了 。） <br>　　训练时间：1～ 2 个星期。 <br><br>　　到现在，你已经成为了熟练的 JSP 程序员。仍然有很多需要学习，你可以考虑扩展你的知识比如 DHTML ， XML ，java证书， JSP Tag Libraries 或 Servlets , 看你想要造什么类型的网站而决定了。 <br><br>　　这些训练是JSP 的核心。你不必都学习上面所有的, 取决于你在工程中分配到什么任务和你已经有什么知识。但是这是我成功地训练程序员 的时间表。关键的单元是时间。平均的说, 5 个月时间确实能够训练一个人 ( 从开始到完成 ) 成为一个对jsp熟悉程序员。5 个月时间似乎很长，但要成为一个资深的WEB程序员所学的东西远远不止这一些。 <br><br>　　也许你认为这样学习一种语言花费的时间太长了，因为学 ASP 会更快、时间会更短。 但是学习 ASP 不需要学习java的。 
<img src ="http://www.cnitblog.com/asfman/aggbug/27688.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/asfman/" target="_blank">汪杰</a> 2007-05-28 11:05 <a href="http://www.cnitblog.com/asfman/articles/27688.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>几种打开记录集方式的比较</title><link>http://www.cnitblog.com/asfman/articles/27198.html</link><dc:creator>汪杰</dc:creator><author>汪杰</author><pubDate>Fri, 18 May 2007 07:22:00 GMT</pubDate><guid>http://www.cnitblog.com/asfman/articles/27198.html</guid><wfw:comment>http://www.cnitblog.com/asfman/comments/27198.html</wfw:comment><comments>http://www.cnitblog.com/asfman/articles/27198.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/asfman/comments/commentRss/27198.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/asfman/services/trackbacks/27198.html</trackback:ping><description><![CDATA[看：<a href="http://www.jenfy.cn/article/htmldata/list/1/1.html">http://www.jenfy.cn/article/htmldata/list/1/1.html</a><br>几种打开记录集方式的比较<br>　　<br>　　先定义conn.asp<br>　　&lt;%<br>　　 dim objConn<br>　　 dim strConn<br>　　 strConn = &#8220;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=&#8220; &amp; chr(34) &amp; Server.MapPath(&#8220;data.mdb&#8220;) &amp; chr(34) <br>set objConn = server.createobject(&#8220;adodb.connection&#8220;)<br>　　 objConn.open strConn <br>　　%&gt;<br>　　<br>　　再来看一看几种不同打开记录集(recordset)的方式<br>　　<br>　　方式1、<br>　　 dim sql<br>　　 dim objRs<br>　　<br>　　 sql = &#8220;select * from table1&#8220;<br>　　 set objRs = objConn.execute( sql )<br>　　<br>　　这种方式通过执行sql，返回后得到记录集，比较简单地得到经过筛选过的记录集，<br>　　但是通过这种方式得到的记录集，不能进行分页显示。<br>　　<br>　　文件text1.asp<br>　　<br>　　&lt;%@LANGUAGE=&#8220;VBSCRIPT&#8220; CODEPAGE=&#8220;936&#8220;%&gt;<br>　　&lt;!-- #include file=&#8220;conn.asp&#8220; --&gt;<br>　　<br>　　&lt;%<br>　　 dim sql<br>　　 dim objRs<br>　　 <br>　　 sql = &#8220;select * from table1&#8220;<br>　　 set objRs = objConn.execute( sql )<br>　　 <br>　　 objRs.pagesize = 5<br>　　 objRs.absolutepage = 1<br>　　%&gt;<br>　　<br>　　请求该页面得到的结果是:<br>　　<br>　　------------------------------------------------------------<br>　　错误类型：<br>　　ADODB.Recordset (0x800A0CB3)<br>　　当前记录集不支持书签。这可能是提供程序或选定的游标类型的限制。<br>　　/msg/test1.asp, 第 12 行<br>　　<br>　　<br>　　浏览器类型：<br>　　Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) <br>　　<br>　　网页：<br>　　GET /msg/test1.asp <br>　　<br>　　时间：<br>　　2005年9月21日, 19:58:01 <br>　　------------------------------------------------------------<br>　　<br>　　方式2、<br>　　 dim objRs<br>　　 set objRs = Server.CreateObject( &#8220;ADODB.Recordset&#8220; )<br>　　 objRs.open &#8220;table1&#8220; , objConn , 1 , 2<br>　　<br>　　用这种方式打开的记录可以进行分页显示。<br>　　<br>　　&lt;%<br>　　 dim objRs<br>　　 <br>　　 set objRs = Server.CreateObject( &#8220;ADODB.Recordset&#8220; )<br>　　 objRs.open &#8220;table1&#8220; , objConn , 1 , 2<br>　　 <br>　　 objRs.pagesize = 5<br>　　 objRs.absolutepage = 1<br>　　%&gt; <br>　　