|
|
||||
首页
文学作品 网页设计 平面设计 程序设计 考试认证 基础办公 QQ资源 服务器架设 网站运营 网页资源
|
|
|
| 汉南在线 → 网页设计 → 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>
| |||||||||||
| >> 相关文章 | |||||||||||
|
授权使用:汉南在线 http://hnzx.hzwz.net/ 经营许可证:陕ICP备05000109号 Powered by:汉南在线 Copyright (c) 2002-2008 汉南在线. All Rights Reserved . |