{"id":775,"date":"2011-11-18T00:14:22","date_gmt":"2011-11-17T16:14:22","guid":{"rendered":""},"modified":"2014-03-11T22:40:46","modified_gmt":"2014-03-11T14:40:46","slug":"%e7%94%a8asp%e7%94%9f%e6%88%90html%e7%9a%84%e6%96%b0%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"http:\/\/www.xiaoyebailong.com\/index.php\/2011\/11\/18\/775.htm","title":{"rendered":"\u7528ASP\u751f\u6210html\u7684\u65b0\u65b9\u6cd5"},"content":{"rendered":"<p>\u7f51\u4e0a\u5df2\u6709\u5f88\u591a\u5173\u4e8e\u751f\u6210<a rel=\"nofollow\" href=\"http:\/\/www.jzxue.com\/wangyesheji\/html\/\" target=\"_blank\"><font color=\"#333333\">html<\/font><\/a>\u7684\u65b0\u95fb\u7cfb\u7edf\uff0c\u4f46\u662f\u90fd\u662f\u7528\u7684\u6a21\u677f\uff0c\u672c\u51fd\u6570\u5b9e\u73b0\u628a<a rel=\"nofollow\" href=\"http:\/\/www.jzxue.com\/wangzhankaifa\/asp\/\" target=\"_blank\"><font color=\"#333333\">asp<\/font><\/a>\u9875\u9762\u4ea7\u751f\u7684<a rel=\"nofollow\" href=\"http:\/\/www.jzxue.com\/wangyesheji\/html\/\" target=\"_blank\"><font color=\"#333333\">html<\/font><\/a>\u4ee3\u7801\u4fdd\u5b58\u6210\u4e3a\u4e00\u4e2ahtml\u6587\u4ef6\uff0c\u8fd9\u6837\u5c31\u6ca1\u6709\u5fc5\u8981\u6539\u52a8\u539f\u6765\u7684\u9875\u9762\u5c31\u53ef\u4ee5\u8f7b\u677e\u5b8c\u6210\u4e00\u4e2a\u751f\u6210html\u7684\u65b0\u95fb\u7cfb\u7edf\u4e86\u3002^_^ <br \/>\n\u7531\u4e8e\u4ee3\u7801\u6bd4\u8f83\u77ed\uff0c\u8fd9\u91cc\u5c31\u4e0d\u8fdb\u884c\u6ce8\u91ca\u4e86 <\/p>\n<p>\u4ee5\u4e0b\u4e3a\u5f15\u7528\u7684\u5185\u5bb9\uff1a<\/p>\n<p>&lt;% <br \/>\n&#8221;\u5f53\u76ee\u6807\u9875\u9762\u7684\u5305\u542b\u6587\u4ef6\u5373#include\u7684\u9875\u9762\u91cc\u8fb9\u5b58\u5728response.End()\u7684\u65f6\u5019\u672c\u7a0b\u5e8f\u6709\u95ee\u9898 <br \/>\n&#8221;\u6ce8\u610f\uff1a\u672c\u6587\u4ef6\u4e00\u5b9a\u8981\u653e\u572820041227111723.htm\u6307\u5411\u7684\u6587\u4ef6\u7684\u540c\u4e00\u76ee\u5f55\u4e0b <br \/>\ndim hughchiu_rtcode <br \/>\nFunction <a rel=\"nofollow\" href=\"http:\/\/www.jzxue.com\/tag\/get\/\" target=\"_blank\"><font color=\"#333333\">get<\/font><\/a>_exe_code(20041227111723.htm) <br \/>\ndim execode <br \/>\ndim tmp_str <br \/>\nDim re,re1,content,fso,f,<a rel=\"nofollow\" href=\"http:\/\/www.jzxue.com\/tag\/FlashAS\/\" target=\"_blank\"><font color=\"#333333\">as<\/font><\/a>pStart,aspEnd <br \/>\ndim ms,m <br \/>\nexecode = &quot;&quot; <br \/>\nset fso=CreateObject(&quot;Scr<a rel=\"nofollow\" href=\"http:\/\/www.jzxue.com\/tag\/IP\/\" target=\"_blank\"><font color=\"#333333\">ip<\/font><\/a>ting.FileSystemObject&quot;) <br \/>\nset f=fso.OpenTextFile(<a rel=\"nofollow\" href=\"http:\/\/www.jzxue.com\/fuwuqi\/\" target=\"_blank\"><font color=\"#333333\">server<\/font><\/a>.mappath(20041227111723.htm)) <br \/>\ncontent=f.ReadAll <br \/>\nf.close <br \/>\nset f=nothing <br \/>\nset fso=nothing <\/p>\n<p>set re = new regexp <br \/>\nre.ignorecase = true <br \/>\nre.global = true <br \/>\nre.pattern = &quot;\\&lt;\\%\\@[^\\%]+\\%\\&gt;&quot; <br \/>\ncontent = re.replace(content,&quot;&quot;) <\/p>\n<p>re.global = false <br \/>\nre.pattern = &quot;\\&lt;\\!\\-\\-\\s*\\#include\\s*file\\s*=\\s*\\&quot;&quot;([^\\&quot;&quot;]+)\\&quot;&quot;\\s*\\-\\-\\&gt;&quot; <br \/>\ndo <br \/>\nset ms = re.execute(content) <br \/>\nif ms.count&lt;&gt;0 then <br \/>\nset m = ms(0) <br \/>\ntmp_str = get_exe_code(m.submatches(0)) <br \/>\ncontent = re.replace(content, tmp_str) <br \/>\nelse <br \/>\nexit do <br \/>\nend if <br \/>\nloop <br \/>\nset m = nothing <br \/>\nset ms = nothing <\/p>\n<p>re.pattern=&quot;^\\s*=&quot; <br \/>\naspEnd=1 <br \/>\naspStart=inStr(aspEnd,content,&quot;&lt;%&quot;)+2 <\/p>\n<p>set re1=new RegExp <br \/>\nre1.ignorecase = true <br \/>\nre1.global = false <br \/>\nre1.pattern = &quot;response\\.Write(.+)&quot; <\/p>\n<p>do while aspStart&gt;aspEnd+1 <br \/>\nexecode = execode&amp;vbcrlf&amp;&quot; hughchiu_rtcode = hughchiu_rtcode&amp;&quot;&quot;&quot;&amp;replace( replace(Mid(content,aspEnd,aspStart-aspEnd-2),&quot;&quot;&quot;&quot;,&quot;&quot;&quot;&quot;&quot;&quot;), vbcrlf, &quot;&quot;&quot;&amp;vbcrlf&amp;&quot;&quot;&quot;)&amp;&quot;&quot;&quot;&quot;&amp;vbcrlf <br \/>\naspEnd=inStr(aspStart,content,&quot;%\\&gt;&quot;)+2 <br \/>\ntmp_str = Mid(content,aspStart,aspEnd-aspStart-2) <\/p>\n<p>do <br \/>\nset ms = re1.execute(tmp_str) <br \/>\nif ms.count&lt;&gt;0 then <br \/>\nset m = ms(0) <br \/>\ntmp_str = re1.replace(tmp_str, &quot; hughchiu_rtcode = hughchiu_rtcode&amp;&quot;&amp;m.submatches(0)) <br \/>\nelse <br \/>\nexit do <br \/>\nend if <br \/>\nloop <\/p>\n<p>set m = nothing <br \/>\nset ms = nothing <\/p>\n<p>execode = execode&amp; re.replace(tmp_str,&quot;hughchiu_rtcode = hughchiu_rtcode&amp;&quot;) <\/p>\n<p>aspStart=inStr(aspEnd,content,&quot;&lt;%&quot;)+2 <br \/>\nloop <\/p>\n<p>set re1 = nothing <br \/>\nset re=nothing <\/p>\n<p>execode = execode&amp;vbcrlf&amp;&quot; hughchiu_rtcode = hughchiu_rtcode&amp;&quot;&quot;&quot;&amp;replace( replace(Mid(content,aspEnd), &quot;&quot;&quot;&quot;, &quot;&quot;&quot;&quot;&quot;&quot;), vbcrlf, &quot;&quot;&quot;&amp;vbcrlf&amp;&quot;&quot;&quot; )&amp;&quot;&quot;&quot;&quot;&amp;vbcrlf <br \/>\nget_exe_code = &quot;&lt;%&quot;&amp;execode&amp;&quot;%\\&gt;&quot; <br \/>\nEnd Function <\/p>\n<p>function asp2html(20041227111723.htm) <br \/>\ndim code <br \/>\ncode = replace( replace( replace( get_exe_code(20041227111723.htm), &quot;hughchiu_rtcode = hughchiu_rtcode&amp;&quot;&quot;&quot;&quot;&quot;&amp;vbcrlf, &quot;&quot; ), &quot;&lt;%&quot;, &quot;&quot; ), &quot;%\\&gt;&quot;, &quot;&quot; ) <br \/>\n&#8221;response.Write(code) <br \/>\nexecute(code) <br \/>\n&#8221;response.Write( hughchiu_rtcode ) <br \/>\nasp2html = hughchiu_rtcode <br \/>\nend function <br \/>\n%&gt; <\/p>\n<p>\n\u4f7f\u7528\u8303\u4f8b\uff1a <\/p>\n<p>\u4ee5\u4e0b\u4e3a\u5f15\u7528\u7684\u5185\u5bb9\uff1a<\/p>\n<p>\n\u3000\u3000set fso=CreateObject(&quot;Scripting.FileSystemObject&quot;) <br \/>\n\u3000\u3000set f=fso.CreateTextFile( <a rel=\"nofollow\" href=\"http:\/\/www.jzxue.com\/fuwuqi\/\" target=\"_blank\"><font color=\"#333333\">server<\/font><\/a>.mappath( &quot;youpage.htm&quot; ), true ) <br \/>\n\u3000\u3000f.WriteLine( asp2html(&quot;youpage.asp&quot;) ) <br \/>\n\u3000\u3000f.close <br \/>\n\u3000\u3000set f = nothing <br \/>\n\u3000\u3000set fso = nothing<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7f51\u4e0a\u5df2\u6709\u5f88\u591a\u5173\u4e8e\u751f\u6210html\u7684\u65b0\u95fb\u7cfb\u7edf\uff0c\u4f46\u662f\u90fd\u662f\u7528\u7684\u6a21\u677f\uff0c\u672c\u51fd\u6570\u5b9e\u73b0\u628aasp\u9875\u9762\u4ea7\u751f\u7684html\u4ee3\u7801\u4fdd\u5b58\u6210\u4e3a\u4e00\u4e2ahtml\u6587\u4ef6\uff0c\u8fd9\u6837\u5c31\u6ca1\u6709\u5fc5\u8981\u6539\u52a8\u539f\u6765\u7684\u9875\u9762\u5c31\u53ef\u4ee5\u8f7b\u677e\u5b8c\u6210\u4e00\u4e2a\u751f\u6210html\u7684\u65b0\u95fb\u7cfb\u7edf\u4e86\u3002^_^ \u7531\u4e8e\u4ee3\u7801\u6bd4\u8f83\u77ed\uff0c\u8fd9\u91cc\u5c31\u4e0d\u8fdb\u884c\u6ce8\u91ca\u4e86 &#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-775","post","type-post","status-publish","format-standard","hentry","category-technology"],"_links":{"self":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/775","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=775"}],"version-history":[{"count":1,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/775\/revisions"}],"predecessor-version":[{"id":66626,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/775\/revisions\/66626"}],"wp:attachment":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/media?parent=775"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/categories?post=775"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/tags?post=775"},{"taxonomy":"topic","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/topic?post=775"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}