{"id":1481,"date":"2005-05-09T13:00:54","date_gmt":"2005-05-09T05:00:54","guid":{"rendered":"http:\/\/jason6956.wordpress.com\/2005\/05\/09\/%e8%bd%89%e5%b8%961%e5%b0%8f%e6%99%82asp%e5%85%a5%e9%96%80%ef%bc%8c%e9%9d%9e%e5%b8%b8%e7%b0%a1%e5%96%ae"},"modified":"2010-10-06T21:12:16","modified_gmt":"2010-10-06T13:12:16","slug":"%e8%bd%89%e5%b8%961%e5%b0%8f%e6%99%82asp%e5%85%a5%e9%96%80%ef%bc%8c%e9%9d%9e%e5%b8%b8%e7%b0%a1%e5%96%ae-2","status":"publish","type":"post","link":"https:\/\/jason695.why3s.tw\/wordpress\/2005\/05\/09\/%e8%bd%89%e5%b8%961%e5%b0%8f%e6%99%82asp%e5%85%a5%e9%96%80%ef%bc%8c%e9%9d%9e%e5%b8%b8%e7%b0%a1%e5%96%ae-2\/","title":{"rendered":"[\u8f49\u5e16]1\u5c0f\u6642asp\u5165\u9580\uff0c\u975e\u5e38\u7c21\u55ae"},"content":{"rendered":"<div id=\"msgcns!1BF4A629EA6C6E8E!253\" class=\"bvMsg\">1\u5c0f\u6642ASP\u5165\u9580\uff0c\u975e\u5e38\u7c21\u55ae\u3002<br \/>&lt;%<br \/>\u00a0\u00a0 \u8a9e\u53e5<br \/>\u00a0\u00a0 \u2026\u2026<br \/>\u00a0 %&gt;<br \/>&lt;2&gt;\u5b9a\u7fa9\u8b8a\u91cfdim\u8a9e\u53e5<br \/>&lt;%<br \/>\u00a0 dim a,b<br \/>\u00a0 a=10<br \/>\u00a0 b=\u300dok!\u300d<br \/>%&gt;<br \/>\u6ce8\u610f\uff1a\u5b9a\u7fa9\u7684\u8b8a\u91cf\u53ef\u4ee5\u662f\u6578\u503c\u578b\uff0c\u4e5f\u53ef\u4ee5\u662f\u5b57\u7b26\u6216\u8005\u5176\u4ed6\u985e\u578b\u7684<br \/>&lt;3&gt;\u7c21\u55ae\u7684\u63a7\u5236\u6d41\u7a0b\u8a9e\u53e5<br \/>\u00a0 1. If \u689d\u4ef61 then<br \/>\u00a0\u00a0\u00a0\u00a0 \u8a9e\u53e51<br \/>elseif \u689d\u4ef62 then<br \/>\u00a0\u00a0\u00a0\u00a0 \u8a9e\u53e52<br \/>else<br \/>\u00a0\u00a0\u00a0\u00a0 \u8a9e\u53e53<br \/>endif<br \/>2.while \u689d\u4ef6<br \/>\u00a0\u00a0 \u8a9e\u53e5 <br \/>\u00a0 wend<br \/>3.for count=1 to n step m<br \/>\u00a0 \u8a9e\u53e51<br \/>\u00a0 exit for<br \/>\u00a0 \u8a9e\u53e52<br \/>next <br \/>\u4e8c.ASP\u6578\u64da\u5eab\u7c21\u55ae*\u4f5c\u6559\u7a0b<br \/>&lt;1&gt;.\u6578\u64da\u5eab\u9023\u63a5(\u7528\u4f86\u55ae\u7368\u7de8\u88fd\u9023\u63a5\u6587\u4ef6conn.asp)<br \/>&lt;%<br \/>\u00a0 Set conn = Server.CreateObject(&quot;ADODB.Connection&quot;)<br \/>\u00a0 conn.Open &quot;DRIVER=&#123;Microsoft Access Driver (*.mdb)&#125;; DBQ=&quot; &amp; Server.MapPath(&quot;\\bbs\\db1\\user.mdb&quot;) <br \/>%&gt;<br \/>(\u7528\u4f86\u9023\u63a5bbs\\db1\\\u76ee\u9304\u4e0b\u7684user.mdb\u6578\u64da\u5eab)<br \/>&lt;2&gt;\u986f\u793a\u6578\u64da\u5eab\u8a18\u9304<br \/>\u00a0 \u539f\u7406\uff1a\u5c07\u6578\u64da\u5eab\u4e2d\u7684\u8a18\u9304\u4e00\u4e00\u986f\u793a\u5230\u5ba2\u6236\u7aef\u700f\u89bd\u5668\uff0c\u4f9d\u6b21\u8b80\u51fa\u6578\u64da\u5eab\u4e2d\u7684\u6bcf\u4e00\u689d\u8a18\u9304<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u5982\u679c\u662f\u5f9e\u982d\u5230\u5c3e\uff1a\u7528\u5faa\u74b0\u4e26\u5224\u65b7\u6307\u91dd\u662f\u5426\u5230\u672b\u00a0\u00a0\u00a0\u00a0\u00a0 \u4f7f\u7528: not rs.eof<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u5982\u679c\u662f\u5f9e\u5c3e\u5230\u982d\uff1a\u7528\u5faa\u74b0\u4e26\u5224\u65b7\u6307\u91dd\u662f\u5426\u5230\u958b\u59cb\u00a0\u00a0\u00a0 \u4f7f\u7528\uff1anot rs.bof<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;!&#8211;#include file=conn.asp&#8211;&gt;\u00a0\u00a0\u00a0 (\u5305\u542bconn.asp\u7528\u4f86\u6253\u958bbbs\\db1\\\u76ee\u9304\u4e0b\u7684user.mdb\u6578\u64da\u5eab)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;%<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 set rs=server.CreateObject(&quot;adodb.recordset&quot;)\u00a0 (\u5efa\u7acbrecordset\u5c0d\u50cf)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 sqlstr=&quot;select * from message&quot;\u00a0 &#8212;-&gt;(message\u70ba\u6578\u64da\u5eab\u4e2d\u7684\u4e00\u500b\u6578\u64da\u8868\uff0c\u5373\u4f60\u8981\u986f\u793a\u7684\u6578\u64da\u6240\u5b58\u653e\u7684\u6578\u64da\u8868)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 rs.open sqlstr,conn,1,3\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8212;-&gt;(\u8868\u793a\u6253\u958b\u6578\u64da\u5eab\u7684\u65b9\u5f0f)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 rs.movefirst\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8212;-&gt;(\u5c07\u6307\u91dd\u79fb\u5230\u7b2c\u4e00\u689d\u8a18\u9304)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 while not rs.eof\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8212;-&gt;(\u5224\u65b7\u6307\u91dd\u662f\u5426\u5230\u672b\u5c3e)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 response.write(rs(&quot;name&quot;))\u00a0\u00a0\u00a0\u00a0\u00a0 &#8212;-&gt;(\u986f\u793a\u6578\u64da\u8868message\u4e2d\u7684name\u5b57\u6bb5)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 rs.movenext\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8212;-&gt;(\u5c07\u6307\u91dd\u79fb\u52d5\u5230\u4e0b\u4e00\u689d\u8a18\u9304)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 wend\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8212;-&gt;(\u5faa\u74b0\u7d50\u675f)<br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 rs.close<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 conn.close\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u9019\u5e7e\u53e5\u662f\u7528\u4f86\u95dc\u9589\u6578\u64da\u5eab<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 set rs=nothing<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 set conn=nothing<br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 %&gt;<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u5176\u4e2dresponse\u5c0d\u8c61\u662f\u670d\u52d9\u5668\u5411\u5ba2\u6236\u7aef\u700f\u89bd\u5668\u767c\u9001\u7684\u4fe1\u606f<br \/>&lt;3&gt;\u589e\u52a0\u6578\u64da\u5eab\u8a18\u9304<br \/>\u589e\u52a0\u6578\u64da\u5eab\u8a18\u9304\u7528\u5230rs.addnew,rs.update\u5169\u500b\u51fd\u6578<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;!&#8211;#include file=conn.asp&#8211;&gt;\u00a0\u00a0\u00a0 (\u5305\u542bconn.asp\u7528\u4f86\u6253\u958bbbs\\db1\\\u76ee\u9304\u4e0b\u7684user.mdb\u6578\u64da\u5eab)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;%<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 set rs=server.CreateObject(&quot;adodb.recordset&quot;)\u00a0 (\u5efa\u7acbrecordset\u5c0d\u50cf)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 sqlstr=&quot;select * from message&quot;\u00a0 &#8212;-&gt;(message\u70ba\u6578\u64da\u5eab\u4e2d\u7684\u4e00\u500b\u6578\u64da\u8868\uff0c\u5373\u4f60\u8981\u986f\u793a\u7684\u6578\u64da\u6240\u5b58\u653e\u7684\u6578\u64da\u8868)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 rs.open sqlstr,conn,1,3\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8212;-&gt;(\u8868\u793a\u6253\u958b\u6578\u64da\u5eab\u7684\u65b9\u5f0f)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 rs.addnew\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u65b0\u589e\u52a0\u4e00\u689d\u8a18\u9304<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 rs(&quot;name&quot;)=&quot;xx&quot;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u5c07xx\u7684\u503c\u50b3\u7d66name\u5b57\u6bb5<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 rs.update\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u5237\u65b0\u6578\u64da\u5eab <br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 rs.close<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 conn.close\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u9019\u5e7e\u53e5\u662f\u7528\u4f86\u95dc\u9589\u6578\u64da\u5eab<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 set rs=nothing<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 set conn=nothing<br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 %&gt;<br \/>&lt;4&gt;\u522a\u9664\u4e00\u689d\u8a18\u9304<br \/>\u00a0 \u522a\u9664\u6578\u64da\u5eab\u8a18\u9304\u4e3b\u8981\u7528\u5230rs.delete,rs.update<br \/>\u00a0\u00a0 &lt;!&#8211;#include file=conn.asp&#8211;&gt;\u00a0\u00a0\u00a0 (\u5305\u542bconn.asp\u7528\u4f86\u6253\u958bbbs\\db1\\\u76ee\u9304\u4e0b\u7684user.mdb\u6578\u64da\u5eab)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;%<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 dim name<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 name=&quot;xx&quot;<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 set rs=server.CreateObject(&quot;adodb.recordset&quot;)\u00a0 (\u5efa\u7acbrecordset\u5c0d\u50cf)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 sqlstr=&quot;select * from message&quot;\u00a0 &#8212;-&gt;(message\u70ba\u6578\u64da\u5eab\u4e2d\u7684\u4e00\u500b\u6578\u64da\u8868\uff0c\u5373\u4f60\u8981\u986f\u793a\u7684\u6578\u64da\u6240\u5b58\u653e\u7684\u6578\u64da\u8868)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 rs.open sqlstr,conn,1,3\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8212;-&gt;(\u8868\u793a\u6253\u958b\u6578\u64da\u5eab\u7684\u65b9\u5f0f)<br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 while not rs.eof<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 if rs.(&quot;name&quot;)=name then<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 rs.delete<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 rs.update\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u67e5\u8a62\u6578\u64da\u8868\u4e2d\u7684name\u5b57\u6bb5\u7684\u503c\u662f\u5426\u7b49\u65bc\u8b8a\u91cfname\u7684\u503c&quot;xx&quot;\uff0c\u5982\u679c\u7b26\u5408\u5c31\u57f7\u884c\u522a\u9664\uff0c<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 else\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u5426\u5247\u7e7c\u7e8c\u67e5\u8a62,\u76f4\u5230\u6307\u91dd\u5230\u672b\u5c3e\u70ba\u6b62<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 rs.movenext<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 emd if<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 wend<br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 rs.close<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 conn.close\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u9019\u5e7e\u53e5\u662f\u7528\u4f86\u95dc\u9589\u6578\u64da\u5eab<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 set rs=nothing<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 set conn=nothing<br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- <br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 %&gt;<br \/>&lt;5&gt;\u95dc\u65bc\u6578\u64da\u5eab\u7684\u67e5\u8a62<br \/>\u00a0 (a) \u67e5\u8a62\u5b57\u6bb5\u70ba\u5b57\u7b26\u578b<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;%<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 dim user,pass,qq,mail,message<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 user=request.Form(&quot;user&quot;)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 pass=request.Form(&quot;pass&quot;)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 qq=request.Form(&quot;qq&quot;)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 mail=request.Form(&quot;mail&quot;)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 message=request.Form(&quot;message&quot;)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 if trim(user)&amp;&quot;x&quot;=&quot;x&quot; or trim(pass)&amp;&quot;x&quot;=&quot;x&quot; then\u00a0\u00a0\u00a0\u00a0 (\u6aa2\u6e2cuser\u503c\u548cpass\u503c\u662f\u5426\u70ba\u7a7a\uff0c\u53ef\u4ee5\u6aa2\u6e2c\u5230\u7a7a\u683c)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 response.write(&quot;\u8a3b\u518a\u4fe1\u606f\u4e0d\u80fd\u70ba\u7a7a&quot;)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 else<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 set rs=server.CreateObject(&quot;adodb.recordset&quot;)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 sqlstr=&quot;select * from user where user=&#8217;&quot;&amp;user&amp;&quot;&#8217;&quot;\u00a0\u00a0\u00a0 (\u67e5\u8a62user\u6578\u64da\u8868\u4e2d\u7684user\u5b57\u6bb5\u5176\u4e2duser\u5b57\u6bb5\u70ba\u5b57\u7b26\u578b)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 rs.open sqlstr,conn,1,3<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 if\u00a0 rs.eof then<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 rs.addnew<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 rs(&quot;user&quot;)=user<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 rs(&quot;pass&quot;)=pass<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 rs(&quot;qq&quot;)=qq<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 rs(&quot;mail&quot;)=mail<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 rs(&quot;message&quot;)=message<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 rs.update<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 rs.close<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 conn.close<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 set rs=nothing<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 set conn=nothing<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 response.write(&quot;\u8a3b\u518a\u6210\u529f&quot;)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 end if <br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 rs.close<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 conn.close<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 set rs=nothing<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 set conn=nothing<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 response.write(&quot;\u8a3b\u518a\u91cd\u540d&quot;)<br \/>\u00a0\u00a0\u00a0\u00a0 %&gt;<br \/>\u00a0 (b)\u67e5\u8a62\u5b57\u6bb5\u70ba\u6578\u5b57\u578b<br \/>\u00a0\u00a0\u00a0\u00a0 &lt;%<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 dim num<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 num=request.Form(&quot;num&quot;)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 set rs=server.CreateObject(&quot;adodb.recordset&quot;)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 sqlstr=&quot;select * from message where id=&quot;&amp;num\u00a0\u00a0 (\u67e5\u8a62message\u6578\u64da\u8868\u4e2did\u5b57\u6bb5\u7684\u503c\u662f\u5426\u8207num\u76f8\u7b49\uff0c\u5176\u4e2did\u70ba\u6578\u5b57\u578b)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0<br \/>\nrs.open sqlstr,conn,1,3<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 if not rs.eof then<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 rs.delete<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 rs.update<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 rs.close<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 conn.close<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 set rs=nothing<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 set conn=nothing<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 response.write(&quot;\u522a\u9664\u6210\u529f&quot;)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 end if<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 rs.close<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 conn.close<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 set rs=nothing<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 set conn=nothing<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 response.write(&quot;\u522a\u9664\u5931\u6557&quot;)<br \/>\u00a0\u00a0\u00a0\u00a0 %&gt;<br \/>&lt;6&gt;\u5e7e\u500b\u7c21\u55ae\u7684asp\u5c0d\u8c61\u7684\u8b1b\u89e3<br \/>\u00a0\u00a0 response\u5c0d\u50cf:\u670d\u52d9\u5668\u7aef\u5411\u5ba2\u6236\u7aef\u767c\u9001\u7684\u4fe1\u606f\u5c0d\u50cf,\u5305\u62ec\u76f4\u63a5\u767c\u9001\u4fe1\u606f\u7d66\u700f\u89bd\u5668,\u91cd\u65b0\u5b9a\u5411URL\uff0c\u6216\u8a2d\u7f6ecookie\u503c<br \/>\u00a0\u00a0 request\u5c0d\u50cf:\u5ba2\u6236\u7aef\u5411\u670d\u52d9\u5668\u63d0\u51fa\u7684\u8acb\u6c42<br \/>\u00a0\u00a0 session\u5c0d\u50cf:\u4f5c\u70ba\u4e00\u500b\u5168\u5c40\u8b8a\u91cf\uff0c\u5728\u6574\u500b\u7ad9\u9ede\u90fd\u751f\u6548<br \/>\u00a0\u00a0 server\u5c0d\u50cf\uff1a\u63d0\u4f9b\u5c0d\u670d\u52d9\u5668\u4e0a\u65b9\u6cd5\u548c\u5c6c\u6027\u7684\u8a2a\u554f\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <br \/>(a) response\u5c0d\u8c61\u7684\u4e00\u822c\u4f7f\u7528\u65b9\u6cd5<br \/>\u00a0\u00a0\u00a0 \u6bd4\u5982\uff1a<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;%<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 resposne.write(&quot;hello, welcome to asp!&quot;)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 %&gt;<br \/>\u00a0\u00a0\u00a0 \u5728\u5ba2\u6236\u7aef\u700f\u89bd\u5668\u5c31\u6703\u770b\u5230\u00a0 hello, welcome to asp! \u9019\u4e00\u6bb5\u6587\u5b57<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;%<br \/>response.Redirect(&quot;<a href=\"http:\/\/www.sohu.com\">www.sohu.com<\/a>&quot;)<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 %&gt;<br \/>\u00a0\u00a0\u00a0 \u5982\u679c\u57f7\u884c\u9019\u4e00\u6bb5\uff0c\u5247\u700f\u89bd\u5668\u5c31\u6703\u81ea\u52d5\u9023\u63a5\u5230 \u300c\u641c\u72d0\u300d \u7684\u7db2\u5740<br \/>\u00a0 \u95dc\u65bcresponse\u5c0d\u8c61\u7684\u7528\u6cd5\u9084\u6709\u5f88\u591a\uff0c\u5927\u5bb6\u53ef\u4ee5\u7814\u7a76\u7814\u7a76<br \/>\u00a0 request\u5c0d\u8c61\u7684\u4e00\u822c\u4f7f\u7528\u65b9\u6cd5<br \/>\u6bd4\u5982\u5ba2\u6236\u7aef\u5411\u670d\u52d9\u5668\u63d0\u51fa\u7684\u8acb\u6c42\u5c31\u662f\u901a\u904erequest\u5c0d\u50cf\u4f86\u50b3\u905e\u7684<br \/>\u5217\u5982 \uff1a\u4f60\u5728\u7533\u8acb\u90f5\u7bb1\u7684\u6240\u586b\u5beb\u7684\u500b\u4eba\u4fe1\u606f\u5c31\u662f\u901a\u904e\u8a72\u5c0d\u50cf\u4f86\u5c07<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 \u4f60\u6240\u586b\u5beb\u7684\u4fe1\u606f\u50b3\u905e\u7d66\u670d\u52d9\u5668\u7684<br \/>\u6bd4\u5982\uff1a\u9019\u662f\u4e00\u6bb5\u8868\u55ae\u7684\u4ee3\u78bc\uff0c\u9019\u662f\u63d0\u4f9b\u7d66\u5ba2\u6236\u586b\u5beb\u4fe1\u606f\u7684\uff0c\u586b\u5beb\u5b8c\u4e86\u6309<br \/>\u00a0\u00a0\u00a0\u00a0 \u300c\u63d0\u4ea4\u300d\u50b3\u905e\u7d66request.asp\u6587\u4ef6\u8655\u7406\u5f8c\u518d\u5b58\u5165\u670d\u52d9\u5668\u6578\u64da\u5eab<br \/>\u00a0\u00a0\u00a0 &lt;form name=&quot;form1&quot; method=&quot;post&quot; action=&quot;request.asp&quot;&gt;<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;p&gt;<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;input type=&quot;text&quot; name=&quot;user&quot;&gt;<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;\/p&gt;<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;p&gt; <br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;input type=&quot;text&quot; name=&quot;pass&quot;&gt;<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;\/p&gt;<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;p&gt;<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;\u63d0\u4ea4&quot;&gt;<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;\/p&gt;<br \/>&lt;\/form&gt; <br \/>\u90a3\u9ebcrequest.asp\u8a72\u5982\u4f55\u5c07\u5176\u4e2d\u7684\u4fe1\u606f\u8b80\u5165\uff0c\u5728\u5beb\u5165\u6578\u64da\u5eab\uff0c\u5728\u9019\u88e1\u5c31\u8981\u7528\u5230<br \/>request\u5c0d\u8c61\u4e86\uff0c\u4e0b\u9762\u6211\u5011\u5c31\u4f86\u5206\u6790request.asp\u7684\u5beb\u6cd5<br \/>&lt;%<br \/>dim name,password\u00a0\u00a0\u00a0 (\u5b9a\u7fa9user\u548cpassword\u5169\u500b\u8b8a\u91cf)<br \/>name=request.form(\u300cuser\u300d)\u00a0 (\u5c07\u8868\u55ae\u4e2d\u7684user\u4fe1\u606f\u50b3\u7d66\u8b8a\u91cfname)<br \/>password=request.form(\u300cpass\u300d) (\u5c07\u8868\u55ae\u4e2d\u7684pass\u4fe1\u606f\u50b3\u7d66\u8b8a\u91cfpassword)<br \/>%&gt;\u00a0\u00a0\u00a0\u00a0\u00a0 <br \/>\u901a\u904e\u4ee5\u4e0a\u7684\u5e7e\u53e5\u4ee3\u78bc\u6211\u5011\u5c31\u5c07\u8868\u55ae\u4e2d\u7684\u6578\u64da\u8b80\u9032\u4f86\u4e86\uff0c\u63a5\u4e0b\u4f86\u6211\u5011\u8981\u505a\u7684\u5c31\u662f\u5c07<br \/>\u4fe1\u606f\u5beb\u5165\u6578\u64da\u5eab\u4e86\uff0c\u5beb\u5165\u6578\u64da\u5eab\u7684\u65b9\u6cd5\u4e0a\u9762\u90fd\u4ecb\u7d39\u4e86\uff0c\u9019\u88e1\u5c31\u4e0d\u4e00\u4e00\u8907\u8ff0\u4e86\u3002<br \/>\uff08\u901a\u904e\u4e0a\u9762\u7684\u5b78\u7fd2\u5927\u5bb6\u5b8c\u5168\u53ef\u4ee5\u81ea\u5df1\u505a\u4e00\u500b\u7559\u8a00\u7248\u4e86\uff09 <\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>1\u5c0f\u6642ASP\u5165\u9580\uff0c\u975e\u5e38\u7c21\u55ae\u3002&lt;%\u00a0\u00a0 \u8a9e\u53e5\u00a0\u00a0 \u2026\u2026\u00a0 %&gt;&lt;2&gt;\u5b9a\u7fa9\u8b8a\u91cfdim\u8a9e\u53e5&#038; &hellip; <a href=\"https:\/\/jason695.why3s.tw\/wordpress\/2005\/05\/09\/%e8%bd%89%e5%b8%961%e5%b0%8f%e6%99%82asp%e5%85%a5%e9%96%80%ef%bc%8c%e9%9d%9e%e5%b8%b8%e7%b0%a1%e5%96%ae-2\/\" class=\"more-link\">\u95b1\u8b80\u5168\u6587 <span class=\"screen-reader-text\">[\u8f49\u5e16]1\u5c0f\u6642asp\u5165\u9580\uff0c\u975e\u5e38\u7c21\u55ae<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[29],"tags":[],"class_list":["post-1481","post","type-post","status-publish","format-standard","hentry","category-29","no-featured-image"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/posts\/1481","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/comments?post=1481"}],"version-history":[{"count":0,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/posts\/1481\/revisions"}],"wp:attachment":[{"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/media?parent=1481"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/categories?post=1481"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/tags?post=1481"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}