<%
' When the target page contains the file that is the #include page, there is response. End () There is a problem with this procedure
' NOTE: This file must be placed in the same directory as the 20041227111723.htm pointing file
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* #includes *files*=s*" "([^" "]+)" "S*-->"
Todo
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)