ASP生成靜態頁(收1)

2021-04-20 09:03:16 字數 463 閱讀 9384

下面的例子是將、index.asp?id=1/index.asp?id=2/index.asp?id=3/這三個動態頁面,分別生成ndex1.htm,index2.htm,index3.htm存在根目錄下面:

function asp2html(filename)

dim code

code = replace( replace( replace( get_exe_code(filename), "hughchiu_rtcode = hughchiu_rtcode&"""""&vbcrlf, "" ), "<%", "" ), "%/>", "" )

'response.write(code)

execute(code)

'response.write( hughchiu_rtcode )

asp2html = hughchiu_rtcode

end function

%>

ASP生成靜態頁小例子

先是index.asp檔案當然也可以用html的檔案 然後是send.asp這個就是生成靜態頁的檔案 function chan time shijian 轉換日期時間函式 s year year shijian if len s year 2 then s year 20 s year s mon...

asp 靜態生成

asp 靜態生成 filename test.htm if request body then setfso server.createobject scripting.filesystemobject sethtmlwrite filename htmlwrite.write htmlwrite....

生成靜態頁

先定義乙個staticfilecachemodule 實現ihttpmodule介面 定製beginrequest事件 再定義乙個類 要生成靜態頁面的繼承它就行了 將頁面內容輸出到瀏覽器 response.write pagecontent 當然不要忘在配置web.confing 用模板生成靜態頁 ...