asp網站制作教程之ASP生成html方法
2012/5/14 14:55:32
<%
'當目標頁面的包含文件即#include的頁面里邊存在response.End()的時候本程序有問題
'注意:本文件一定要放在20041227111723.htm指向的文件的同一目錄下
dim hughchiu_rtcode
Function get_exe_code(20041227111723.htm)
dim execode
dim tmp_str
Dim re,re1,content,fso,f,aspStart,aspEnd
dim ms,m
execode = ""
set fso=CreateObject("Scripting.FileSystemObject")
set f=fso.OpenTextFile(server.mappath(20041227111723.htm))
content=f.ReadAll
f.close
set f=nothing
set fso=nothing
set re = new regexp
re.ignorecase = true
re.global = true
re.pattern = "\<\%\@[^\%]+\%\>"
content = re.replace(content,"")
re.global = false
re.pattern = "\<\!\-\-\s*\#include\s*file\s*=\s*\""([^\""]+)\""\s*\-\-\>"
do
set ms = re.execute(content)
if ms.count<>0 then
set m = ms(0)
tmp_str = get_exe_code(m.submatches(0))
content = re.replace(content, tmp_str)
else
exit do
end if
loop
set m = nothing
set ms = nothing
re.pattern="^\s*="
aspEnd=1
aspStart=inStr(aspEnd,content,"<%")+2
set re1=new RegExp
re1.ignorecase = true
re1.global = false
re1.pattern = "response\.Write(.+)"
do while aspStart>aspEnd+1
execode = execode&vbcrlf&" hughchiu_rtcode = hughchiu_rtcode&"""&replace( replace(Mid(content,aspEnd,aspStart-aspEnd-2),"""",""""""), vbcrlf, """&vbcrlf&""")&""""&vbcrlf
aspEnd=inStr(aspStart,content,"%\>")+2
tmp_str = Mid(content,aspStart,aspEnd-aspStart-2)
do
set ms = re1.execute(tmp_str)
if ms.count<>0 then
set m = ms(0)
tmp_str = re1.replace(tmp_str, " hughchiu_rtcode = hughchiu_rtcode&"&m.submatches(0))
else
exit do
end if
loop
set m = nothing
set ms = nothing
execode = execode& re.replace(tmp_str,"hughchiu_rtcode = hughchiu_rtcode&")
aspStart=inStr(aspEnd,content,"<%")+2
loop
set re1 = nothing
set re=nothing
execode = execode&vbcrlf&" hughchiu_rtcode = hughchiu_rtcode&"""&replace( replace(Mid(content,aspEnd), """", """"""), vbcrlf, """&vbcrlf&""" )&""""&vbcrlf
get_exe_code = "<%"&execode&"%\>"
End Function
function asp2html(20041227111723.htm)
dim code
code = replace( replace( replace( get_exe_code(20041227111723.htm), "hughchiu_rtcode = hughchiu_rtcode&"""""&vbcrlf, "" ), "<%", "" ), "%\>", "" )
'response.Write(code)
execute(code)
'response.Write( hughchiu_rtcode )
asp2html = hughchiu_rtcode
end function
%>
返回列表
返回首頁
主站蜘蛛池模板:
亚洲日韩乱码中文字幕|
国产成人做受免费视频|
一级毛片人与动免费观看|
日韩欧美亚洲国产精品字幕久久久|
亚洲精品国产电影|
精品国产三级在线观看|
国产伦精品一区二区三区|
h在线免费视频|
国内精品伊人久久久久av影院
|
国产一区二区不卡|
成人在线观看不卡|
国产精品毛片va一区二区三区|
jizzjizz视频|
忍住北条麻妃10分钟让你中出
|
97精品一区二区视频在线观看|
小说区乱图片区|
中文字幕成人免费视频|
日本黄色一级大片|
五月婷婷在线视频|
欧美在线视频一区|
亚洲欧美一级久久精品|
特级毛片在线观看|
免费看三级电影|
美女被无套进入|
国产亚洲欧美日韩在线看片
|
精品久久久无码人妻中文字幕豆芽|
国产乱了真实在线观看|
久久精品人人做人人爽电影蜜月|
a级毛片高清免费视频|
成年女人免费观看视频|
久久亚洲色www成人欧美|
最近在线2018视频免费观看|
亚洲国产成a人v在线观看|
欧美老妇bbbwwbbww|
亚洲精品视频区|
狼色精品人妻在线视频|
免费无码不卡视频在线观看|
精品国产成人亚洲午夜福利|
四虎免费大片aⅴ入口|
自慰系列无码专区|
国产va在线视频观看|