{"id":230,"date":"2009-07-11T20:33:05","date_gmt":"2009-07-11T20:33:05","guid":{"rendered":""},"modified":"2009-07-11T20:33:05","modified_gmt":"2009-07-11T20:33:05","slug":"230","status":"publish","type":"post","link":"https:\/\/www.poloo.org\/?p=230","title":{"rendered":"asp\u751f\u6210\u9759\u6001\u9875\u4e3b\u8981\u6d89\u53ca\u4e09\u4e2a\u65b9\u9762:\u6a21\u677f,\u53c2\u6570,fso."},"content":{"rendered":"<p>1,\u6a21\u677f:\u8fd9\u4e2a\u5176\u5b9e\u5c31\u662f\u9875\u9762\u7684\u6846\u67b6,\u4ee5\u4e0b\u4e3a\u6a21\u677f\u7684\u4f8b\u5b50:<br \/>###############################\u8fd9\u5c31\u662f\u4e00\u4e2a\u6a21\u677f###############################<br \/>&lt;!DOCTYPE html PUBLIC &#8220;-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN&#8221; &#8220;<a href=\"http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd\" target=\"_blank\" rel=\"external\">http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd<\/a>&#8220;&gt;<br \/>&lt;html xmlns=&#8221;<a href=\"http:\/\/www.w3.org\/1999\/xhtml\" target=\"_blank\" rel=\"external\">http:\/\/www.w3.org\/1999\/xhtml<\/a>&#8220;&gt;<br \/>&lt;head&gt;<br \/>&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text\/html; charset=gb2312&#8243; \/&gt;<br \/>&lt;title&gt;$title$&lt;\/title&gt;<br \/>&lt;link href=&#8221;\/Blog\/css\/style1.css&#8221; rel=&#8221;stylesheet&#8221; type=&#8221;text\/css&#8221; \/&gt;<br \/>&lt;meta name=&#8221;description&#8221; content=&#8221;$desc$&#8221; \/&gt;<br \/>&lt;meta name=&#8221;keywords&#8221; content=&#8221;$keywords$&#8221; \/&gt;<br \/>&lt;\/head&gt;<br \/>&lt;body&gt;<br \/>&lt;!&#8211;\u5934\u90e8&#8211;&gt;<br \/>$top$ \/\/\/\/\u8fd9\u4e9b\u5c31\u662f\u66ff\u6362\u53c2\u6570<br \/>&lt;!&#8211;\u5934\u90e8\u7ed3\u675f&#8211;&gt;<br \/>&lt;table border=&#8221;0&#8243; cellpadding=&#8221;0&#8243; cellspacing=&#8221;0&#8243; width=&#8221;760&#8243; style=&#8221;margin-top:2px;&#8221;&gt;<br \/>&lt;tr&gt;<br \/>&lt;td width=&#8221;160&#8243; valign=&#8221;top&#8221; bgcolor=&#8221;#eeeef2&#8243; style=&#8221;border-right:1px #ddd solid&#8221;&gt;<br \/>$web_i$ \/\/\/\/\u8fd9\u4e9b\u5c31\u662f\u66ff\u6362\u53c2\u6570 <br \/>&lt;\/td&gt; <br \/>&lt;!&#8211;\u53f3\u4fa7\u4e13\u9898\u4ecb\u7ecd&#8211;&gt;<br \/>&lt;td valign=&#8221;top&#8221; bgcolor=&#8221;#eeeef2&#8243; style=&#8221;width:265px;height:20px;border-left:1px #fff solid;border-right:1px #ccc solid&#8221;&gt; <br \/>$pic$ \/\/\/\/\u8fd9\u4e9b\u5c31\u662f\u66ff\u6362\u53c2\u6570<br \/>&lt;\/td&gt;<br \/>&lt;td valign=&#8221;top&#8221; style=&#8221;border-left:1px #fff solid&#8221; bgcolor=&#8221;#eeeef2&#8243;&gt;<br \/>$rec_text$ \/\/\/\/\u8fd9\u4e9b\u5c31\u662f\u66ff&nbsp;&nbsp;<br \/>\u6362\u53c2\u6570 <br \/>&lt;\/td&gt;<br \/>&lt;\/tr&gt;<br \/>&lt;\/table&gt;<br \/>&lt;!&#8211;\u4e13\u680f\u7ed3\u675f&#8211;&gt;<br \/>$b_ban$ \/\/\/\/\u8fd9\u4e9b\u5c31\u662f\u66ff\u6362\u53c2\u6570<br \/>&lt;table border=&#8221;0&#8243; cellpadding=&#8221;0&#8243; cellspacing=&#8221;0&#8243;&gt;<br \/>&lt;tr&gt;<br \/>&lt;td width=&#8221;540&#8243; valign=&#8221;top&#8221; style=&#8221;border-right:1px #ccc solid&#8221;&gt;<br \/>$c_list$ \/\/\/\/\u8fd9\u4e9b\u5c31\u662f\u66ff\u6362\u53c2\u6570<br \/>&lt;\/td&gt;<br \/>&lt;td width=&#8221;218&#8243; valign=&#8221;top&#8221; style=&#8221;border-left:1px #fff solid&#8221; bgcolor=&#8221;#eeeef2&#8243;&gt;<br \/>$focus_text$ \/\/\/\/\u8fd9\u4e9b\u5c31\u662f\u66ff\u6362\u53c2\u6570<br \/>&lt;\/td&gt;<br \/>&lt;\/tr&gt;<br \/>&lt;\/table&gt;<br \/>$link$ \/\/\/\/\u8fd9\u4e9b\u5c31\u662f\u66ff\u6362\u53c2\u6570<br \/>$bottom$ \/\/\/\/\u8fd9\u4e9b\u5c31\u662f\u66ff\u6362\u53c2\u6570<br \/>&lt;\/body&gt;<br \/>&lt;\/html&gt;#########################\u7ed3\u675f##################<\/p>\n<p>\u6211\u4eec\u5728\u5236\u4f5c\u52a8\u6001\u9875\u9762\u65f6,\u4e5f\u662f\u5148\u505a\u597d\u9759\u6001\u6846\u67b6,\u7136\u540e\u628a\u52a8\u6001\u5185\u5bb9\u653e\u8fdb\u53bb,\u800c\u6a21\u677f\u5c31\u662f\u672a\u653e\u8fdb\u52a8\u6001\u5185\u5bb9\u7684\u9875\u9762,\u800c\u8fd9\u4e9b\u52a8\u6001\u5185\u5bb9\u90fd\u88ab\u53c2\u6570\u66ff\u6362\u4e86,\u5c31\u50cf\u4e0a\u9762\u7684\u6a21\u677f\u4e2d:$top$,$web_i$,$pic$,$rec_text$,$c_list$,$focu_text$,$link$,$bottom$,\u8fd9\u4e9b\u53c2\u6570\u662f\u81ea\u5df1\u5b9a\u4e49,\u4f60\u53ef\u4ee5\u5199\u6210\u4efb\u4f55\u5f62\u5f0f,\u4e0d\u8fc7\u6700\u597d\u662f\u7528\u5b57\u7b26\u52a0\u5b57\u6bcd,\u8fd9\u4e9b\u53c2\u6570\u662f\u539f\u672c\u8981\u663e\u793a\u52a8\u6001\u5185\u5bb9\u7684\u5730\u65b9.<br \/>\u5982\u679c\u4e0d\u7528\u6a21\u677f\u7684\u8bdd,\u90a3\u5c31\u9700\u8981\u5728\u52a8\u6001\u9875\u9762\u4e2d\u5236\u4f5c\u4e86,\u6bd4\u5982top=top&#8221;\u8981\u8f93\u51fa\u7684\u5185\u5bb9&#8221;&#038;vbcrlf&#8211;(&#038;vbcrlf,\u5c31\u662f\u8ba9\u4ee3\u7801\u53e6\u8d77\u4e00\u884c),\u8fd9\u6837\u505a\u662f\u6bd4\u8f83\u9ebb\u70e6\u7684,\u56e0\u4e3a\u539f\u672c\u7684\u9759\u6001\u6846\u67b6\u4e5f\u8981\u5199\u5728\u91cc\u9762.<br \/>\u5982\u679c\u662f\u6a21\u677f\u751f\u6210\u7684\u8bdd,\u5f53\u7136\u8fd9\u4e9b\u6a21\u677f\u90fd\u662f\u8981\u5b58\u5165\u6570\u636e\u5e93\u7684,\u9996\u5148\u8981\u4ece\u6570\u636e\u5e93\u4e2d\u53d6\u51fa\u6a21\u677f:<br \/>##############\u53d6\u680f\u76ee\u9875\u9762\u6a21\u677f####################<br \/>set rs_m=server.createobject(&#8220;adodb.recordset&#8221;)<br \/>sql=&#8221;select content from mb where id=2&#8243;<br \/>rs_m.open sql,conn,1,1<br \/>main=rs_m(&#8220;content&#8221;)<br \/>rs_m.close<br \/>set rs_m=nothing<br \/>\u7136\u540e\u5c31\u662f\u9010\u4e2a\u66ff\u6362\u6a21\u677f\u4e2d\u7684\u53c2\u6570,\u4f8b\u5982\u4ee5\u4e0b;<br \/>#####################\u539f\u672c\u7684\u52a8\u6001\u5185\u5bb9#############<br \/>response.write &#8220;&lt;div class=&#8221;&#8221;badv&#8221;&#8221;&gt;&#8221;<br \/>set rs_b=server.Cre&nbsp;&nbsp;<br \/>ateObject(&#8220;adodb.recordset&#8221;)<br \/>sql=&#8221;select * from add_banner where p_column='&#8221;&#038;column&#038;&#8221;&#8216; and isselect=&#8217;y&#8217; and p_size=&#8217;760*80&#8242;&#8221;<br \/>rs_b.open sql,conn,1,1<br \/>if rs_b.eof and rs_b.bof then<br \/>response.write &#8220;&lt;img src=&#8221;\/Blog\/&#8221;images\/adv3.gif&#8221;&#8221; width=&#8221;&#8221;760&#8243;&#8221; height=&#8221;&#8221;80&#8243;&#8221; \/&gt;&#8221;<br \/>else<br \/>response.write &lt;img src=&#8221;&#8221;&#8221;&#038;rs_b(&#8220;picture&#8221;)&#038;&#8221;&#8221;&#8221; width=&#8221;&#8221;760&#8243;&#8221; height=&#8221;&#8221;80&#8243;&#8221; \/&gt;&#8221;<br \/>end if<br \/>response.write &#8220;&lt;\/div&gt;&#8221;&#038;vbcrlf<br \/>######################\u751f\u6210\u9759\u6001\u9875\u5b9a\u4e49\u7684\u52a8\u6001\u5185\u5bb9############<br \/>b_ban=&#8221;&lt;div class=&#8221;&#8221;badv&#8221;&#8221;&gt;&#8221;<br \/>set rs_b=server.CreateObject(&#8220;adodb.recordset&#8221;)<br \/>sql=&#8221;select * from add_banner where p_column='&#8221;&#038;column&#038;&#8221;&#8216; and isselect=&#8217;y&#8217; and p_size=&#8217;760*80&#8242;&#8221;<br \/>rs_b.open sql,conn,1,1<br \/>if rs_b.eof and rs_b.bof then<br \/>b_ban=b_ban&#038;&#8221;&lt;img src=&#8221;\/Blog\/&#8221;images\/adv3.gif&#8221;&#8221; width=&#8221;&#8221;760&#8243;&#8221; height=&#8221;&#8221;80&#8243;&#8221; \/&gt;&#8221;<br \/>else<br \/>b_ban=b_ban&#038;&#8221;&lt;img src=&#8221;&#8221;&#8221;&#038;rs_b(&#8220;picture&#8221;)&#038;&#8221;&#8221;&#8221; width=&#8221;&#8221;760&#8243;&#8221; height=&#8221;&#8221;80&#8243;&#8221; \/&gt;&#8221;<br \/>end if<br \/>b_ban=b_ban&#038;&#8221;&lt;\/div&gt;&#8221;&#038;vbcrlf<br \/>######################################<br \/>\u4ece\u4e0a\u9762\u53ef\u4ee5\u770b\u51fa,\u539f\u6765\u7684response.write\u88ab\u66ff\u6362\u4e3ab_ban=b_ban&#038;,\u63a5\u4e0b\u6765\u5c31\u9700\u8981replace\u6765\u66ff\u6362\u6a21\u677f\u4e2d\u7684\u53c2\u6570\u4e86,\u6211\u4eec\u628a\u6a21\u677f\u8d4b\u7ed9\u4e86main,\u5728\u6a21\u677f\u4e2d\u6211\u4eec\u5b9a\u4e49\u7684\u53c2\u6570\u4e3a$b_ban$,\u90a3\u4e48\u52a0\u4e0a\u4e0b\u9762\u7684\u8bdd:<br \/>main=replace(main,&#8221;$b_ban$&#8221;,b_ban),b_ban\u5c31\u662f\u52a8\u6001\u5185\u5bb9,b_ban\u662f\u53ef\u4ee5\u968f\u4fbf\u5b9a\u4e49\u7684,\u4f60\u4e5f\u53ef\u4ee5\u5b9a\u4e49\u4e3aban,\u90a3\u4e48main=replace(main,&#8221;$b_ban&#8221;,ban),\u8fd9\u91cc\u5b57\u4e49\u4e3ab_ban\u662f\u4e3a\u4e86\u66f4\u6e05\u6670\u4e9b.<br \/>\u5176\u5b83\u7684\u53c2\u6570&nbsp;&nbsp;<br \/>\u66ff\u6362\u8ddf\u8fd9\u4e2a\u9053\u7406\u662f\u4e00\u6837\u7684.\u5f53\u628a\u6a21\u677f\u4e2d\u6240\u6709\u7684\u53c2\u6570\u90fd\u66ff\u6362\u5b8c\u4ee5\u540e,\u5c31\u9700\u8981fso\u6765\u751f\u6210\u4e86.<br \/>fso\u662fiis\u5185\u7f6e\u7684\u7ec4\u4ef6,\u6240\u4ee5\u53ea\u8981\u5b89\u88c5\u4e86iss,\u5c31\u53ef\u4ee5\u4f7f\u7528fso,\u5b83\u7684\u5b9a\u4e49\u683c\u5f0f\u5982\u4e0b:<br \/>set fso(\u8fd9\u4e2a\u4e5f\u662f\u81ea\u5df1\u5b9a\u4e49,\u5728\u8fd9\u91cc\u6211\u628a\u5b83\u5b9a\u4e49\u4e3afso)=server.createobject(&#8220;scripting.filesystemobject&#8221;) \/\/\u8fd9\u6837\u5c31\u5b9a\u4e49\u4e86fso<br \/>set fout=fso.createtextfile(server.mappath(&#8220;index.htm&#8221;)) \/\/\u8fd9\u91cc\u662f\u5b9a\u4e49fout\u5728\u5f53\u524d\u7684\u670d\u52a1\u5668\u4e0a\u751f\u6210\u540d\u4e3aindex.htm(\u540e\u7f00\u4e5f\u662f\u81ea\u5df1\u5b9a\u4e49\u7684,\u53ef\u4ee5\u662fhtml,sthml\u7b49\u9759\u6001\u540e\u8f8d)\u7684\u6587\u4ef6,\u8fd9\u4e2a\u6587\u4ef6\u76ee\u524d\u662f\u7a7a\u767d.<br \/>fout.write main \/\/\u5199\u5165\u9759\u6001\u9875\u9762\u7684\u5185\u5bb9,\u8fd9\u6837index.htm\u9875\u9762\u5c31\u7b97\u662f\u5b8c\u5168\u751f\u6210\u4e86,<br \/>fout.close \/\/\u5173\u95edfout<br \/>set fout=nothing \/\/\u6e05\u7a7afout<br \/>set fso=nothing \/\/\u6e05\u7a7afso<br \/>\u8fd9\u6837\u4ece\u6a21\u677f\u751f\u6210\u7684\u9759\u6001\u9875\u9762\u5c31\u5b8c\u6210\u4e86.<br \/>\u5982\u679c\u4e0d\u4f7f\u7528\u6a21\u677f\u7684\u8bdd,\u90a3\u5c31\u4e0d\u5fc5\u4f7f\u7528replace\u800c\u662f\u76f4\u63a5\u4f7f\u7528fout.wirte.<br \/>\u4f8b\u5982\u6211\u4eec\u5728\u8fd9\u4e2a\u9875\u9762\u6709top,body,bottom\u4e09\u4e2a\u53c2\u6570,\u90a3\u5c31\u662f<br \/>set fso(\u8fd9\u4e2a\u4e5f\u662f\u81ea\u5df1\u5b9a\u4e49,\u5728\u8fd9\u91cc\u6211\u628a\u5b83\u5b9a\u4e49\u4e3afso)=server.createobject(&#8220;scripting.filesystemobject&#8221;) \/\/\u8fd9\u6837\u5c31\u5b9a\u4e49\u4e86fso<br \/>set fout=fso.createtextfile(server.mappath(&#8220;index.htm&#8221;)) \/\/\u8fd9\u91cc\u662f\u5b9a\u4e49fout\u5728\u5f53\u524d\u7684\u670d\u52a1\u5668\u4e0a\u751f\u6210\u540d\u4e3aindex.htm(\u540e\u7f00\u4e5f\u662f\u81ea\u5df1\u5b9a\u4e49\u7684,\u53ef\u4ee5\u662fhtml,sthml\u7b49\u9759\u6001\u540e\u8f8d)\u7684\u6587\u4ef6,\u8fd9\u4e2a\u6587\u4ef6\u76ee\u524d\u662f\u7a7a\u767d.<br \/>fout.write top \/\/\u5199\u5165\u9759\u6001\u9875\u9762\u7684\u5185\u5bb9<br \/>fout.write body \/\/\u5199\u5165\u9759\u6001\u9875\u9762\u7684\u5185\u5bb9<br \/>fout.write bottom\/\/\u5199\u5165\u9759\u6001\u9875\u9762\u7684\u5185\u5bb9<br \/>fout.close \/\/\u5173\u95edfout<br \/>set fout=nothing \/\/\u6e05\u7a7afout<br \/>set fso=nothing \/\/\u6e05\u7a7afso<br \/>\u8fd9\u6837\u76f4\u63a5\u751f\u6210\u9759\u6001\u9875\u9762\u5c31\u5b8c\u6210\u4e86.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1,\u6a21\u677f:\u8fd9\u4e2a\u5176\u5b9e\u5c31\u662f\u9875\u9762\u7684\u6846\u67b6,\u4ee5\u4e0b\u4e3a\u6a21\u677f\u7684\u4f8b\u5b50:########&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-230","post","type-post","status-publish","format-standard","hentry","category-Dream"],"_links":{"self":[{"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/posts\/230","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.poloo.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=230"}],"version-history":[{"count":0,"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/posts\/230\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.poloo.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=230"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.poloo.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=230"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.poloo.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}