最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
一段用ASP查看ASP文件源码的程序.
时间:2022-07-02 23:28:57 编辑:袖梨 来源:一聚教程网
<%
SUB PrintLine (ByVal strLine)
strLine=server.HTMLEncode(strLine)
strLine=replace(strLine,"<%","<%")
strLine=replace(strLine,"%>","%>")
strLine=replace(strLine,"<SCRIPT","<SCRIPT",1,-1,1)
strLine=replace(strLine,"</SCRIPT>","</SCRIPT>",1,-1,1)
strLine=replace(strLine,"<!--","<!--",1,-1,1)
strLine=replace(strLine,"-->","-->",1,-1,1)
Response.Write strLine
END SUB
Function ShowCode(filename)
Dim strFilename
Dim FileObject, oInStream, strOutput
strFilename = filename
Set FileObject = Server.CreateObject("Scripting.FileSystemObject")
Set oInStream = FileObject.OpenTextFile(strFilename, 1, 0, 0 )
While NOT oInStream.AtEndOfStream
strOutput = oInStream.ReadLine
Call PrintLine(strOutput)
Response.Write("
")
Wend
end function
%>
ASP源码浏览器
<%
on error resume next
dim file
file=request.form("filename")
response.write file & "源程序如下
"
if trim(file)<> "" then
call showcode(file)
end if
%>
SUB PrintLine (ByVal strLine)
strLine=server.HTMLEncode(strLine)
strLine=replace(strLine,"<%","<%")
strLine=replace(strLine,"%>","%>")
strLine=replace(strLine,"<SCRIPT","<SCRIPT",1,-1,1)
strLine=replace(strLine,"</SCRIPT>","</SCRIPT>",1,-1,1)
strLine=replace(strLine,"<!--","<!--",1,-1,1)
strLine=replace(strLine,"-->","-->",1,-1,1)
Response.Write strLine
END SUB
Function ShowCode(filename)
Dim strFilename
Dim FileObject, oInStream, strOutput
strFilename = filename
Set FileObject = Server.CreateObject("Scripting.FileSystemObject")
Set oInStream = FileObject.OpenTextFile(strFilename, 1, 0, 0 )
While NOT oInStream.AtEndOfStream
strOutput = oInStream.ReadLine
Call PrintLine(strOutput)
Response.Write("
")
Wend
end function
%>
<%
on error resume next
dim file
file=request.form("filename")
response.write file & "源程序如下
"
if trim(file)<> "" then
call showcode(file)
end if
%>
相关文章
- 江南百景图听风塔怎么样 11-22
- 原神恰斯卡圣遗物怎么搭配 11-22
- 2024年霸王茶姬11月22日口令是什么 2024.11.22霸王茶姬口令介绍 11-22
- 光遇11.21季节蜡烛在哪里 光遇11月21日季节蜡烛位置攻略 11-22
- 光遇11.21大蜡烛在哪里 光遇11月21日大蜡烛位置攻略 11-22
- 光遇11.21免费魔法有什么 光遇11月21日免费魔法收集攻略 11-22