{"id":609,"date":"2010-07-21T16:34:22","date_gmt":"2010-07-21T08:34:22","guid":{"rendered":""},"modified":"2014-03-11T22:33:02","modified_gmt":"2014-03-11T14:33:02","slug":"asp%e7%a8%8b%e5%ba%8f%e5%ae%9e%e7%8e%b0%e7%bd%91%e9%a1%b5%e4%bc%aa%e9%9d%99%e6%80%81%e9%a1%b5%e6%ba%90%e4%bb%a3%e7%a0%81","status":"publish","type":"post","link":"http:\/\/www.xiaoyebailong.com\/index.php\/2010\/07\/21\/609.htm","title":{"rendered":"ASP\u7a0b\u5e8f\u5b9e\u73b0\u7f51\u9875\u4f2a\u9759\u6001\u9875\u6e90\u4ee3\u7801"},"content":{"rendered":"<p>\u5f88\u7b80\u5355\u7684\u6559\u7a0b\uff0c\u732e\u7ed9\u559c\u6b22SEO\u7684\u670b\u53cb\u4eec\u3002\u628ahttp:\/\/www.***.cn\/article.asp?logID=26&nbsp; &nbsp;\u66ff\u6362\u6210http:\/\/www.***.cn\/article.asp?\/a26.html\u3002\u4e0d\u9700\u8981\u901a\u8fc7iis+ISAPI_Rewrite\u505a\u57fa\u4e8eIIS\u7684url rewrite <\/p>\n<p>\n\u4e00\u3001\u6570\u636e\u5e93\u5f88\u7b80\u5355\u4f7f\u7528ACCESS\uff0cData.mdb\u5efa\u7acb\u4e00\u4e2a\u8868Article\uff0c\u4e09\u4e2a\u5b57\u6bb5\uff1aID\uff0cTitle\uff0cContent\uff1b\u81ea\u52a8\u7f16\u53f7\u3001\u6807\u9898\u3001\u6587\u7ae0\u5185\u5bb9\u3002 <\/p>\n<p>\n\u4e8c\u3001Config.aspASP\/Visual Basic\u4ee3\u7801 <\/p>\n<p>\n\u4ee5\u4e0b\u4e3a\u5f15\u7528\u7684\u5185\u5bb9\uff1a&lt;%&nbsp; &nbsp; &#8216;\u6570\u636e\u5e93\u94fe\u63a5&nbsp; &nbsp; db=&quot;data.mdb&quot;&nbsp; &nbsp;Set conn = Server.CreateObject(&quot;ADODB.Connection&quot;)&nbsp; &nbsp; connstr=&quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=&quot; &amp; Server.MapPath(db)&nbsp; &nbsp; conn.open connstr&nbsp; &nbsp; If Err Then&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;err.Clear&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;Set conn = Nothing&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;Response.Write &quot;\u6570\u636e\u5e93\u8fde\u63a5\u51fa\u9519\uff0c\u8bf7\u68c0\u67e5\u8fde\u63a5\u5b57\u4e32\u3002&quot;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;Response.End&nbsp; &nbsp;&nbsp; &nbsp; End If&#8217;\u5b9a\u4e49\u65b0\u95fb\u9605\u8bfb\u754c\u9762\u7684\u8bfb\u53d6Dim News_title,News_content&nbsp; &nbsp; Sub ReadNews()&nbsp; &nbsp;&nbsp;&nbsp;set rs1=server.createobject(&quot;adodb.recordset&quot;)&nbsp; &nbsp;&nbsp; &nbsp;sql1=&quot;select id,title,content from article where id=&quot;&amp; ID&nbsp; &nbsp; rs1.open sql1,conn,3,3&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;News_title=rs1(&quot;title&quot;)&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;News_content=rs1(&quot;content&quot;)&nbsp; &nbsp; rs1.close&nbsp; &nbsp; set rs1=Nothing&nbsp; &nbsp;End Sub&nbsp; &nbsp;&nbsp;&nbsp;%&gt; <\/p>\n<p>\u4e09\u3001Default.asp <\/p>\n<p>\u4ee5\u4e0b\u4e3a\u5f15\u7528\u7684\u5185\u5bb9\uff1aASP\/Visual Basic\u4ee3\u7801&lt;!&#8211;#include file=&quot;config.asp&quot;&#8211;&gt;&nbsp; &nbsp; &lt;ol&gt;&nbsp; &nbsp; &lt;%&nbsp; &nbsp; Set rs=server.CreateObject(&quot;adodb.recordset&quot;)&nbsp; &nbsp; sql=&quot;select * from Article&quot;&nbsp; &nbsp;rs.open sql,conn,1,1&nbsp; &nbsp; do while not rs.eof&nbsp; &nbsp; %&gt;&nbsp; &nbsp; &lt;li&gt;&lt;a href=&quot;article.asp?\/&lt;%=rs(&quot;id&quot;)%&gt;.html&quot;&gt;&lt;%=left(trim(rs(&quot;title&quot;)),30)%&gt;&lt;\/a&gt;&lt;\/li&gt;&nbsp; &nbsp; &lt;%&nbsp; &nbsp; rs.movenext&nbsp; &nbsp; loop&nbsp; &nbsp; rs.close&nbsp; &nbsp; set rs=Nothing&nbsp; &nbsp;%&gt;&nbsp; &nbsp; &lt;\/ol&gt;&nbsp; &nbsp;<\/p>\n<p>\u56db\u3001Article.asp <\/p>\n<p>\nASP\/Visual Basic\u4ee3\u7801 <\/p>\n<p>\n\u4ee5\u4e0b\u4e3a\u5f15\u7528\u7684\u5185\u5bb9\uff1a&lt;!&#8211;#include file=&quot;config.asp&quot;&#8211;&gt;&nbsp; &nbsp; &lt;%&nbsp; &nbsp; id=request.QueryString(&quot;id&quot;)&nbsp; &nbsp; If id=&quot;&quot; Then&nbsp; &nbsp;&nbsp;&nbsp;server_v40=Request.ServerVariables(&quot;QUERY_STRING&quot;)&nbsp; &nbsp; id=Int(replace(replace(server_v40,&quot;\/&quot;,&quot;&quot;),&quot;.html&quot;,&quot;&quot;))&nbsp; &nbsp; End If&nbsp; &nbsp;&nbsp;&nbsp;Call ReadNews()&nbsp; &nbsp; %&gt;&nbsp; &nbsp; &lt;div&gt;&nbsp; &nbsp; \u6807\u9898: &lt;b&gt;&lt;%= News_title%&gt;&lt;\/b&gt;&lt;br \/&gt;&nbsp; &nbsp; \u5185\u5bb9: &lt;%=News_content%&gt;&nbsp; &nbsp; &lt;\/div&gt;&nbsp; &nbsp;<\/p>\n<p>\u8fd9\u4e2a\u6559\u7a0b\u5df2\u7ecf\u80fd\u5b9e\u73b0\u6700\u57fa\u672c\u7684\u529f\u80fd\uff0c\u5177\u4f53\u5927\u5bb6\u5c31\u60f3\u600e\u4e48\u5e94\u7528\u5c31\u516b\u4ed9\u8fc7\u6d77\uff0c\u5404\u663e\u795e\u901a\u4e86\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5f88\u7b80\u5355\u7684\u6559\u7a0b\uff0c\u732e\u7ed9\u559c\u6b22SEO\u7684\u670b\u53cb\u4eec\u3002\u628ahttp:\/\/www.***.cn\/article.asp?logID=26&nbsp; &nbsp;\u66ff\u6362\u6210http:\/\/www.***.cn\/article.asp?\/a26.html\u3002\u4e0d\u9700\u8981\u901a\u8fc7i&#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-609","post","type-post","status-publish","format-standard","hentry","category-technology"],"_links":{"self":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/609","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=609"}],"version-history":[{"count":1,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/609\/revisions"}],"predecessor-version":[{"id":66479,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/609\/revisions\/66479"}],"wp:attachment":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/media?parent=609"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/categories?post=609"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/tags?post=609"},{"taxonomy":"topic","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/topic?post=609"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}