争怎路由网:是一个主要分享无线路由器安装设置经验的网站,汇总WiFi常见问题的解决方法。

一段用ASP查看ASP文件源码的程序

时间:2024/6/17作者:未知来源:争怎路由网人气:

<%
SUB PrintLine (ByVal strLine)
    strLine=server.HTMLEncode(strLine)
    strLine=replace(strLine,"&lt;%","<FONT COLOR=#ff0000>&lt;%")
    strLine=replace(strLine,"%&gt;","%&gt;</FONT>")
    strLine=replace(strLine,"&lt;SCRIPT","<FONT COLOR=#0000ff>&lt;SCRIPT",1,-1,1)
    strLine=replace(strLine,"&lt;/SCRIPT&gt;","&lt;/SCRIPT&gt;</FONT>",1,-1,1)
    strLine=replace(strLine,"&lt;!--","<FONT COLOR=#008000>&lt;!--",1,-1,1)
    strLine=replace(strLine,"--&gt;","--&gt;</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查看ASP文件源码的程序




Copyright © 2012-2018 争怎路由网(http://www.zhengzen.com) .All Rights Reserved 网站地图 友情链接

免责声明:本站资源均来自互联网收集 如有侵犯到您利益的地方请及时联系管理删除,敬请见谅!

QQ:1006262270   邮箱:kfyvi376850063@126.com   手机版