一段查看ASP文件源码的ASP程序
来源:CSDN 时间:2007-09-21 12:53:00
一段查看ASP文件源码的ASP程序,需要的朋友可以试试!
<%
SUB PrintLine (ByVal strLine)
strLine=server.HTMLEncode(strLine)
strLine=replace(strLine,"<%","<FONT COLOR=#ff0000><%")
strLine=replace(strLine,"%>","%></FONT>")
strLine=replace(strLine,"<SCRIPT","<FONT COLOR=#0000ff><SCRIPT",1,-1,1)
strLine=replace(strLine,"</SCRIPT>","</SCRIPT></FONT>",1,-1,1)
strLine=replace(strLine,"<!--","<FONT COLOR=#008000><!--",1,-1,1)
strLine=replace(strLine,"-->","--></FONT>",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("<BR>")
Wend
end function
%>
<HTML>
<HEAD>
<TITLE>ASP源码浏览器</TITLE>
</HEAD>
<BODY BGCOLOR=#FFFFFF>
<form action=viewcode.asp method=post>
请输入ASP文件名
<input type=file name=filename>
<input type=submit value="查看源程序">
</form>
<%
on error resume next
dim file
file=request.form("filename")
response.write file & "源程序如下<hr>"
if trim(file)<> "" then
call showcode(file)
end if
%>
</FONT>
</BODY>
</HTML>
标签:源码,asp
0
投稿
猜你喜欢
用python查找统一局域网下ip对应的mac地址
2023-01-23 19:10:21
Linux下远程连接Jupyter+pyspark部署教程
2021-03-31 18:35:59
在VSCode中配置PHP开发环境的实战步骤
2023-06-06 02:13:06
深入解析python中的实例方法、类方法和静态方法
2022-07-23 09:05:57
向数据库中插入数据并返回当前插入的行数及全局变量@@IDENTITY应用
2024-01-13 05:11:00
Thinkphp模板中使用自定义函数的方法
2024-05-13 09:57:29
python threading和multiprocessing模块基本用法实例分析
2021-08-13 04:23:49
ajax在js中和jQuery中的用法实例详解
2024-02-26 06:12:31
ASP中实现分页显示的七种方法
2007-09-20 13:19:00
CSS制作11种风格不同的特效文字
2010-10-20 20:08:00
ASP实现下载系统防盗链方法
2008-02-01 14:05:00
python基于K-means聚类算法的图像分割
2021-03-30 02:29:05
js从Cookies里面取值的简单实现
2024-06-21 22:22:03
Python自然语言处理 NLTK 库用法入门教程【经典】
2022-10-06 04:36:54
JS+CSS实现仿支付宝菜单选中效果代码
2023-10-05 07:29:01
aspx中的mysql操作类sqldatasource使用示例分享
2024-01-21 17:10:14
Python入门之列表用法详解
2023-10-04 05:44:50
js解析xml字符串和xml文档实现原理及代码(针对ie与火狐)
2024-04-18 09:51:29
Python中的tkinter库简单案例详解
2021-01-20 14:25:16
oracle 动态AdvStringGrid完美示例 (AdvStringGrid使用技巧/Cells)
2009-06-19 17:21:00