{"id":60,"date":"2013-11-30T02:50:31","date_gmt":"2013-11-29T18:50:31","guid":{"rendered":"http:\/\/www.yptk.cn\/index.php\/2013\/11\/30\/%e5%8d%81%e5%a4%a9%e5%ad%a6%e4%bc%9aasp%e4%b9%8b%e7%ac%ac%e5%85%ab%e5%a4%a9\/"},"modified":"2013-11-30T02:50:31","modified_gmt":"2013-11-29T18:50:31","slug":"%e5%8d%81%e5%a4%a9%e5%ad%a6%e4%bc%9aasp%e4%b9%8b%e7%ac%ac%e5%85%ab%e5%a4%a9","status":"publish","type":"post","link":"http:\/\/yptk.cn\/index.php\/2013\/11\/30\/%e5%8d%81%e5%a4%a9%e5%ad%a6%e4%bc%9aasp%e4%b9%8b%e7%ac%ac%e5%85%ab%e5%a4%a9\/","title":{"rendered":"\u5341\u5929\u5b66\u4f1aASP\u4e4b\u7b2c\u516b\u5929"},"content":{"rendered":"<div id=\"fontsize_6562\" style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\">\n\t\u5b66\u4e60\u76ee\u7684\uff1a\u5b66\u4f1a\u6570\u636e\u5e93\u7684\u57fa\u672c\u64cd\u4f5c4\uff08\u4fee\u6539\u8bb0\u5f55\uff09<br \/>\n&nbsp;&nbsp;&nbsp; \u5148\u6765\u770b\u4ee3\u7801\uff1a<br \/>\n&lt;%<br \/>\nset conn=server.createobject(&#8220;adodb.connection&#8221;)<br \/>\nconn.open &#8220;driver={microsoft access driver (*.mdb)};dbq=&#8221;&amp;server.mappath(&#8220;test.mdb&#8221;)\/\/\u8fd9\u4e0d\u662f\u4ee5\u524d\u7684\u4e00\u4e2a\u6570\u636e\u5e93\uff0c\u91cc\u9762\u5c31aa,bb\u4e24\u4e2a\u5b57\u6bb5<br \/>\nexec=&#8221;select * from test where id=&#8221;&amp;request.querystring(&#8220;id&#8221;)<br \/>\nset rs=server.createobject(&#8220;adodb.recordset&#8221;)<br \/>\nrs.open exec,conn<br \/>\n%&gt;<br \/>\n&lt;form name=&#8221;form1&#8243; method=&#8221;post&#8221; action=&#8221;modifysave.asp&#8221;&gt;<br \/>\n&lt;table width=&#8221;748&#8243; border=&#8221;0&#8243; cellspacing=&#8221;0&#8243; cellpadding=&#8221;0&#8243;&gt;<br \/>\n&lt;tr&gt;&nbsp;<br \/>\n&lt;td&gt;aa&lt;\/td&gt;<br \/>\n&lt;td&gt;bb&lt;\/td&gt;<br \/>\n&lt;\/tr&gt;<br \/>\n&lt;tr&gt;&nbsp;<br \/>\n&lt;td&gt;<br \/>\n&lt;input type=&#8221;text&#8221; name=&#8221;aa&#8221; value=&#8221;&lt;%=rs(&#8220;aa&#8221;)%&gt;&#8221;&gt;<br \/>\n&lt;\/td&gt;<br \/>\n&lt;td&gt;<br \/>\n&lt;input type=&#8221;text&#8221; name=&#8221;bb&#8221; value=&#8221;&lt;%=rs(&#8220;bb&#8221;)%&gt;&#8221;&gt;<br \/>\n&lt;input type=&#8221;submit&#8221; name=&#8221;Submit&#8221; value=&#8221;\u63d0\u4ea4&#8221;&gt;<br \/>\n&lt;input type=&#8221;hidden&#8221; name=&#8221;id&#8221; value=&#8221;&lt;%=request.querystring(&#8220;id&#8221;)%&gt;&#8221;&gt;<br \/>\n&lt;\/td&gt;<br \/>\n&lt;\/tr&gt;<br \/>\n&lt;\/table&gt;<br \/>\n&lt;\/form&gt;<br \/>\n&lt;%<br \/>\nrs.close<br \/>\nset rs=nothing<br \/>\nconn.close<br \/>\nset conn=nothing<br \/>\n%&gt;<br \/>\n\u5927\u5bb6\u5230\u73b0\u5728\u5e94\u8be5\u5206\u6790\u8fd9\u4e2a\u4ee3\u7801\u6ca1\u6709\u4ec0\u4e48\u95ee\u9898\uff0c\u8fd9\u4e2a\u4ee3\u7801\u7684\u4f5c\u7528\u662f\u63a5\u53d7\u524d\u9762\u4e00\u4e2a\u9875\u9762\u7684ID\u7136\u540e\u663e\u793a\u8fd9\u6761\u8bb0\u5f55\uff0c\u6587\u672c\u6846\u5373\u662f\u8f93\u5165\u7684\u5730\u65b9\u4e5f\u662f\u663e\u793a\u7684\u5730\u65b9\uff0c\u5982\u679c\u9700\u8981\u4fee\u6539\u7684\u8bdd\u4fee\u6539\u4ee5\u540e\u6309\u63d0\u4ea4\uff1b\u5982\u679c\u4e0d\u9700\u8981\u4fee\u6539\u5c31\u53ef\u4ee5\u76f4\u63a5\u6309\u63d0\u4ea4\u6309\u94ae\u3002\u8fd9\u91cc\u8fd8\u6709\u4e00\u4e2a\u4e1c\u897f\u4ee5\u524d\u6ca1\u6709\u8bf4\uff0c\u90a3\u5c31\u662f\u9690\u85cf\u7684\u8868\u5355\u5143\u7d20\uff1ahidden\u5143\u7d20\uff0c\u91cc\u9762\u7684value\u662f\u4e0d\u7528\u7528\u6237\u8f93\u5165\u7684\uff0c\u4f1a\u968f\u7740\u8868\u5355\u4e00\u8d77\u63d0\u4ea4\uff0c\u7528\u4e8e\u4f20\u9012\u53d8\u91cf\u3002\u4e0b\u9762\u662fmodifysave.asp\u7684\u4ee3\u7801\uff1a<br \/>\n&lt;%<br \/>\nset conn=server.createobject(&#8220;adodb.connection&#8221;)<br \/>\nconn.open &#8220;driver={microsoft access driver (*.mdb)};dbq=&#8221;&amp;server.mappath(&#8220;test.mdb&#8221;)<br \/>\nexec=&#8221;select * from test where id=&#8221;&amp;request.form(&#8220;id&#8221;)<br \/>\nset rs=server.createobject(&#8220;adodb.recordset&#8221;)<br \/>\nrs.open exec,conn,1,3<br \/>\nrs(&#8220;aa&#8221;)=request.form(&#8220;aa&#8221;)<br \/>\nrs(&#8220;bb&#8221;)=request.form(&#8220;bb&#8221;)<br \/>\nrs.update<br \/>\nrs.close<br \/>\nset rs=nothing<br \/>\nconn.close<br \/>\nset conn=nothing<br \/>\n%&gt;<br \/>\n\u5728\u8fd9\u91cc\uff0crs.open exec,conn,1,3\u540e\u9762\u7684\u53c2\u6570\u662f1\uff0c3\uff0c\u8fd9\u6211\u4ee5\u524d\u63d0\u8fc7\uff0c\u4fee\u6539\u8bb0\u5f55\u5c31\u8981\u75281\uff0c3\u3002\u5b9e\u9645\u4e0a\u4fee\u6539\u8bb0\u5f55\u5f88\u5bb9\u6613\u770b\u61c2\uff0c\u8bb0\u5f55\u96c6\u662frs\uff0crs(&#8220;aa&#8221;)\u5c31\u662f\u5f53\u524d\u8bb0\u5f55aa\u5b57\u6bb5\u7684\u4e1c\u897f\uff0c\u8ba9\u5b83\u7b49\u4e8e\u65b0\u7684\u6570\u636erequest.form(&#8220;aa&#8221;)\u5f53\u7136\u5c31\u4fee\u6539\u4e86\uff0c\u4e0d\u8fc7\u6700\u540e\u522b\u5fd8\u8bb0\u4fdd\u5b58\uff0c\u90a3\u5c31\u662frs.update\uff01&nbsp;<br \/>\n\u8bf4\u5230\u8fd9\u91cc\uff0c\u8bb0\u5f55\u7684\u641c\u7d22\uff0c\u8bfb\u53d6\uff0c\u4fee\u6539\uff0c\u63d2\u5165\u90fd\u8bf4\u4e86\uff0c\u901a\u8fc7\u8fd9\u6700\u57fa\u672c\u7684\u4e1c\u897f\u5c31\u53ef\u4ee5\u4f5c\u51fa\u590d\u6742\u7684\u4e1c\u897f\u4e86\uff0c\u5916\u9762\u7684\u5927\u578b\u6570\u636e\u5e93\uff1a\u65b0\u95fb\u7cfb\u7edf\uff0c\u7559\u8a00\u7c3f\u5c31\u662f\u5b57\u6bb5\u591a\u4e00\u70b9\u7f62\u4e86\u3002\u4eca\u5929\u7684\u793a\u4f8b\u4e2d\u7684\u4ee3\u7801\u662f\u7ed3\u5408\u4ee5\u524d\u7684\u6570\u636e\u5e93\u7684\uff0c\u5927\u5bb6DOWN\u4e86\u4ee5\u540e\u56de\u53bb\u8c03\u8bd5\u5206\u6790\u4e00\u4e0b\u3002\uff08rar\u91cc\u9762\u7684\u90a3\u4e2aexample72.asp\u8fd8\u662f\u4f9b\u5927\u5bb6\u67e5\u8be2\u8bb0\u5f55ID\u548c\u6838\u5bf9\u4fee\u6539\u4ee5\u540e\u7684\u8bb0\u5f55\u7528\u7684\uff09\n<\/div>\n<p style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\">\n\t&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b66\u4e60\u76ee\u7684\uff1a\u5b66\u4f1a\u6570\u636e\u5e93\u7684\u57fa\u672c\u64cd\u4f5c4\uff08\u4fee\u6539\u8bb0\u5f55\uff09 &nbsp;&nbsp;&nbsp; \u5148\u6765\u770b\u4ee3\u7801\uff1a &lt;% set conn=server.createobject(&#8220;adodb.connection&#8221;) conn.open &#8220;driver={microsoft access driver (*.mdb)};dbq=&#8221;&amp;server.map [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[15],"tags":[],"class_list":["post-60","post","type-post","status-publish","format-standard","hentry","category-15"],"_links":{"self":[{"href":"http:\/\/yptk.cn\/index.php\/wp-json\/wp\/v2\/posts\/60","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/yptk.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/yptk.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/yptk.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/yptk.cn\/index.php\/wp-json\/wp\/v2\/comments?post=60"}],"version-history":[{"count":0,"href":"http:\/\/yptk.cn\/index.php\/wp-json\/wp\/v2\/posts\/60\/revisions"}],"wp:attachment":[{"href":"http:\/\/yptk.cn\/index.php\/wp-json\/wp\/v2\/media?parent=60"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/yptk.cn\/index.php\/wp-json\/wp\/v2\/categories?post=60"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/yptk.cn\/index.php\/wp-json\/wp\/v2\/tags?post=60"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}