{"id":191,"date":"2008-12-03T09:24:53","date_gmt":"2008-12-03T01:24:53","guid":{"rendered":""},"modified":"2014-02-27T22:59:41","modified_gmt":"2014-02-27T14:59:41","slug":"asp%e5%ba%94%e7%94%a8%e4%b9%8b%e6%a8%a1%e6%9d%bf%e9%87%87%e7%94%a8","status":"publish","type":"post","link":"http:\/\/www.xiaoyebailong.com\/index.php\/2008\/12\/03\/191.htm","title":{"rendered":"ASP\u5e94\u7528\u4e4b\u6a21\u677f\u91c7\u7528"},"content":{"rendered":"<p>\u521d\u5b66ASP\uff0c\u7a0b\u5e8f\u662f\u80fd\u52c9\u5f3a\u5199\u51fa\u6765\u4e86\uff0c\u4f46\u82e5\u6bcf\u8fdb\u884c\u4e00\u6b21\u7f51\u7ad9\u9875\u9762\u7684\u6539\u7248\uff0c\u6240\u6709\u7684\u6e90\u7a0b\u5e8f\u90fd\u5c06\u8fdb\u884c\u4e00\u6b21\u79fb\u690d\u624b\u672f\u3002\u4e3a\u6b64\u6240\u8017\u8d39\u7684\u4eba\u529b\u7cbe\u529b\u4e0d\u8ba1\u5176\u6570\uff0c\u751a\u81f3\u4e00\u4e0d\u5c0f\u5fc3\u5f97\u4e0d\u507f\u5931\u3001\u524d\u529f\u5c3d\u5f03\u3002&nbsp; <\/p>\n<p>\u6240\u4ee5\uff0c\u68a6\u60f3\u7740\u90a3\u4e48\u5927\u6bb5\u7684\u7a0b\u5e8f\u4ee3\u7801\u53d8\u6210\u51e0\u4e2a\u7b80\u5355\u7684\u5b57\u7b26\u4ee3\u66ff\uff0c\u8fd9\u6837\u53ea\u8981\u8bbe\u8ba1\u597d\u9875\u9762\u628a\u8be5\u529f\u80fd\u63d2\u5165\u5c31OK\u4e86\u3002\u5176\u5b9e\u8fd9\u4e5f\u7b80\u5355\uff0c\u53ea\u9700\u5c06\u5b9e\u73b0\u8be5\u529f\u80fd\u7684\u7a0b\u5e8f\u4ee3\u7801\u505a\u6210\u5b50\u7a0b\u5e8f\uff0c\u7136\u540e\u4e3b\u9875\u8c03\u7528\u5c31\u53ef\u4ee5\u4e86\u3002&nbsp; <\/p>\n<p>\u5f88\u591a\u65f6\u5019\uff0c\u5728\u535a\u5ba2\u4e2d\u56fd\uff0c\u4f60\u4f1a\u9009\u62e9\u5230\u5f88\u591a\u7684\u6a21\u677f\uff0c\u751a\u81f3\u6709\u53ef\u80fd\u81ea\u5df1\u6765\u8bbe\u8ba1\uff1b\u6216\u8005\u91c7\u7528\u732a\u98de\u98deBLOG\u7684\u5404\u5927\u7ad9\u957f\u90fd\u5c06\u5176\u7ad9\u70b9\u6539\u5f97\u4e0d\u8fd1\u76f8\u540c&hellip;&hellip;\u8fd9\u4e9b\uff0c\u6211\u4eec\u90fd\u5f52\u529f\u4e8eASP\u91c7\u7528\u6a21\u677f\u7684\u529f\u80fd\u3002&nbsp; <\/p>\n<p>\u90a3\u4e0b\u9762\u5076\u5c31\u501f\u82b1\u732e\u4f5b\uff0c\u5c06\u6a21\u677f\u62ff\u6765\u5206\u6790\uff0c\u4ee5\u9988\u5404\u4f4d\u670b\u53cb\u3002&nbsp; <\/p>\n<p>\u9996\u5148\uff0c\u6a21\u677f\u9700\u8981\u5728\u7ebf\u4fee\u6539\uff0c\u5219\u5e94\u91c7\u7528\u6570\u636e\u5e93\u4fdd\u5b58\u6a21\u677f\u4ee3\u7801&nbsp; <\/p>\n<p>\u6240\u8c13\u7684\u6a21\u677f\uff0c\u5c31\u662f\u8bbe\u8ba1\u5b8c\u5de5\u7684\u6807\u51c6\u7684HTML\u4ee3\u7801\uff0c\u5176\u4e2d\u9700\u8981\u7531\u7a0b\u5e8f\u5b9e\u73b0\u7684\u529f\u80fd\u90e8\u5206\u5c06\u91c7\u7528\u7279\u6b8a\u5b57\u7b26\u4e32\u4ee3\u66ff\u3002\u7136\uff0c\u8fd9\u4e9b\u7279\u6b8a\u5b57\u7b26\u4e32\u9700\u8981\u5728\u663e\u793a\u7684\u65f6\u5019\u88ab\u7f16\u8bd1\u4e3a\u5bf9\u5e94\u7684\u529f\u80fd\u3002&nbsp; <\/p>\n<p>2\uff0c\u5047\u8bbe\u7b2c\u4e00\u6a21\u677f\u5185\u5bb9\u4ee3\u7801&nbsp; <\/p>\n<p>\u5c06\u4e0b\u5217\u4ee3\u7801\u62f7\u8d1d\u5230m_html\u5b57\u6bb5\u4e2d&nbsp; <\/p>\n<p>&lt;html&gt;&nbsp; <br \/>\n&lt;head&gt;&nbsp; <br \/>\n&lt;meta&nbsp;http-equiv=&quot;Content-Type&quot;&nbsp;content=&quot;text\/html;&nbsp;charset=gb2312&quot;&gt;&nbsp; <br \/>\n&lt;title&gt;testmb&lt;\/title&gt;&nbsp; <br \/>\n&lt;\/head&gt;&nbsp; <br \/>\n&lt;body&nbsp;leftmargin=&quot;0&quot;&nbsp;topmargin=&quot;0&quot;&gt;&nbsp; <br \/>\n&lt;table&nbsp;width=&quot;100%&quot;&nbsp;height=&quot;100%&quot;&nbsp;border=&quot;0&quot;&nbsp;cellpadding=&quot;5&quot;&nbsp;&nbsp; <br \/>\ncellspacing=&quot;2&quot;&gt;&nbsp; <br \/>\n&nbsp;&nbsp;&lt;tr&nbsp;align=&quot;right&quot;&nbsp;bgcolor=&quot;#CCCCCC&quot;&gt;&nbsp;&nbsp; <br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&nbsp;height=&quot;20&quot;&nbsp;colspan=&quot;2&quot;&gt;$cntop$&lt;\/td&gt;&nbsp; <br \/>\n&nbsp;&nbsp;&lt;\/tr&gt;&nbsp; <br \/>\n&nbsp;&nbsp;&lt;tr&nbsp;valign=&quot;top&quot;&gt;&nbsp;&nbsp; <br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&nbsp;width=&quot;25%&quot;&nbsp;bgcolor=&quot;#e5e5e5&quot;&gt;$cnleft$&lt;\/td&gt;&nbsp; <br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&nbsp;width=&quot;74%&quot;&nbsp;bgcolor=&quot;#f3f3f3&quot;&gt;$cnright$&lt;\/td&gt;&nbsp; <br \/>\n&nbsp;&nbsp;&lt;\/tr&gt;&nbsp; <br \/>\n&lt;\/table&gt;&nbsp; <br \/>\n&lt;\/body&gt;&nbsp; <br \/>\n&lt;\/html&gt;&nbsp; <\/p>\n<p>\u6ce8\u610f$cntop$\u3001$cnleft$\u3001$cnright$\uff0c\u5b83\u4eec\u5c06\u8981\u5b9e\u73b0\u67d0\u4e9b\u5177\u4f53\u7684\u7a0b\u5e8f\u529f\u80fd&nbsp; <\/p>\n<p>3\uff0c\u5efa\u7acb\u6570\u636e\u5e93\u8fde\u63a5\u6587\u4ef6conn.asp&nbsp; <\/p>\n<p>&lt;%&nbsp; <br \/>\nset&nbsp;conn=&nbsp;Server.CreateObject(&quot;ADODB.Connection&quot;)&nbsp; <br \/>\nconnstr=&quot;Provider=Microsoft.Jet.OLEDB.4.0;Data&nbsp;Source=&quot;&amp;Server.MapPath(&quot;testmb.mdb&quot;)&nbsp; <br \/>\nconn.Open&nbsp;connstr&nbsp; <br \/>\n%&gt;&nbsp; <\/p>\n<p>4\uff0c\u5efa\u7acb\u7279\u6b8a\u5b57\u7b26\u4e32\u8f6c\u6362\u6240\u9700\u8981\u7684\u5e93\u6587\u4ef6lib.asp&nbsp; <\/p>\n<p>\u8be5\u6587\u4ef6\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5c06\u5b9e\u73b0\u67d0\u4e9b\u529f\u80fd\u7684ASP\u7a0b\u5e8f\u505a\u6210\u5b57\u7a0b\u5e8f\uff0c\u4ee5\u65b9\u4fbf\u8c03\u7528\u3002&nbsp; <\/p>\n<p>&lt;%&nbsp; <br \/>\ndim&nbsp;topcode&nbsp; <br \/>\nsub&nbsp;cntop()&nbsp; <br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;topcode=&quot;\u73b0\u5728\u65f6\u95f4\u662f\uff1a&quot;&nbsp; <br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;topcode=topcode&amp;now()&nbsp; <br \/>\nend&nbsp;sub&nbsp; <\/p>\n<p>dim&nbsp;leftcode,i&nbsp; <br \/>\nsub&nbsp;cnleft()&nbsp; <br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;for&nbsp;i&nbsp;=&nbsp;1&nbsp;to&nbsp;5&nbsp; <br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;leftcode=leftcode&amp;&quot;&lt;p&gt;cnbruce.com&quot;&nbsp; <br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;next&nbsp; <br \/>\nend&nbsp;sub&nbsp; <\/p>\n<p>dim&nbsp;rightcode&nbsp; <br \/>\nsub&nbsp;cnright()&nbsp; <br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;for&nbsp;i&nbsp;=&nbsp;1&nbsp;to&nbsp;9&nbsp; <br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;rightcode=rightcode&amp;&quot;&lt;hr&nbsp;color=&quot;&amp;i&amp;i&amp;i&amp;i&amp;i&amp;i&amp;&quot;&gt;&quot;&nbsp; <br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;next&nbsp; <br \/>\nend&nbsp;sub&nbsp;&nbsp; <br \/>\n%&gt;&nbsp; <\/p>\n<p>5\uff0c\u6700\u540e\uff0c\u8c03\u7528\u6570\u636e\u5e93\u4e2d\u7684\u6a21\u677f\u4ee3\u7801\uff0c\u5c06\u7279\u6b8a\u5b57\u7b26\u4e32\u8f6c\u6362\u3002&nbsp; <\/p>\n<p>&lt;!&#8211;#include&nbsp;file=&quot;conn.asp&quot;&nbsp;&#8211;&gt;&nbsp; <br \/>\n&lt;!&#8211;#include&nbsp;file=&quot;lib.asp&quot;&nbsp;&#8211;&gt;&nbsp; <br \/>\n&lt;%&nbsp; <br \/>\nsql=&quot;select&nbsp;*&nbsp;from&nbsp;moban&nbsp;where&nbsp;m_id=1&quot;&nbsp; <br \/>\nset&nbsp;rs=Server.CreateObject(&quot;adodb.recordset&quot;)&nbsp; <br \/>\nrs.open&nbsp;sql,conn,1,1&nbsp; <br \/>\nmb_code=rs(&quot;m_html&quot;)&nbsp; <br \/>\nrs.close&nbsp; <br \/>\nset&nbsp;rs=nothing&nbsp; <\/p>\n<p>cntop()&nbsp; <br \/>\nmb_code=replace(mb_code,&quot;$cntop$&quot;,topcode)&nbsp; <br \/>\ncnleft()&nbsp; <br \/>\nmb_code=replace(mb_code,&quot;$cnleft$&quot;,leftcode)&nbsp; <br \/>\ncnright()&nbsp; <br \/>\nmb_code=replace(mb_code,&quot;$cnright$&quot;,rightcode)&nbsp; <\/p>\n<p>response.write&nbsp;mb_code&nbsp; <br \/>\n%&gt;&nbsp; <\/p>\n<p>\u8be5\u9875\u4e3b\u8981\u4f5c\u7528\u662f\u5c06\u6a21\u677f\u4ee3\u7801\u8fdb\u884c\u663e\u793a\uff0c\u5e76\u5c06\u5176\u4e2d\u7684\u7279\u6b8a\u4ee3\u7801\u8f6c\u53d8\u4e3a\u76f8\u5bf9\u5e94\u5b50\u7a0b\u5e8f\u529f\u80fd\u3002&nbsp; <\/p>\n<p>\u81f3\u6b64\uff0cASP\u7684\u6a21\u677f\u529f\u80fd\u57fa\u672c\u5b8c\u6210\uff0c\u5269\u4e0b\u7684\u5c31\u662f\uff1a\u5efa\u7acb\u5177\u5907\u7f16\u8f91\u6a21\u677f\u529f\u80fd\u7684\u7a0b\u5e8f\u9875\u9762\uff0c\u5c06\u5e93\u6587\u4ef6\u6539\u53d8\u4e3a\u81ea\u5df1\u6240\u9700\u8981\u7a0b\u5e8f\u529f\u80fd&hellip;&hellip;&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u521d\u5b66ASP\uff0c\u7a0b\u5e8f\u662f\u80fd\u52c9\u5f3a\u5199\u51fa\u6765\u4e86\uff0c\u4f46\u82e5\u6bcf\u8fdb\u884c\u4e00\u6b21\u7f51\u7ad9\u9875\u9762\u7684\u6539\u7248\uff0c\u6240\u6709\u7684\u6e90\u7a0b\u5e8f\u90fd\u5c06\u8fdb\u884c\u4e00\u6b21\u79fb\u690d\u624b\u672f\u3002\u4e3a\u6b64\u6240\u8017\u8d39\u7684\u4eba\u529b\u7cbe\u529b\u4e0d\u8ba1\u5176\u6570\uff0c\u751a\u81f3\u4e00\u4e0d\u5c0f\u5fc3\u5f97\u4e0d\u507f\u5931\u3001\u524d\u529f\u5c3d\u5f03\u3002&nbsp; \u6240\u4ee5\uff0c\u68a6\u60f3\u7740\u90a3\u4e48\u5927\u6bb5\u7684\u7a0b\u5e8f\u4ee3\u7801\u53d8\u6210\u51e0\u4e2a\u7b80\u5355\u7684\u5b57\u7b26\u4ee3\u66ff\uff0c\u8fd9\u6837\u53ea\u8981\u8bbe\u8ba1&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"topic":[],"class_list":["post-191","post","type-post","status-publish","format-standard","hentry","category-technology"],"_links":{"self":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/191","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/comments?post=191"}],"version-history":[{"count":1,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/191\/revisions"}],"predecessor-version":[{"id":66072,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/191\/revisions\/66072"}],"wp:attachment":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/media?parent=191"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/categories?post=191"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/tags?post=191"},{"taxonomy":"topic","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/topic?post=191"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}