最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
让使用者可以看到你的ASP的原代码
时间:2022-06-30 11:20:58 编辑:袖梨 来源:一聚教程网
假如你写了一个ASP的程序,希望让你的使用者看到ASP的原始代码,你可以利用FileSystemObject这个对象送出程序原始代码.<%@ Language=VBScript%>
<%Option Explicit%>
<%
Dim strURL
strURL = Request.QueryString("URL")
Dim strDir, strFileName
strDir = Request.ServerVariables("APPL_PHYSICAL_PATH")
Response.Write strDir
strFileName = Replace(strURL,"/","")
strFileName = strDir & strFileName
Const ForReading = 1
Dim objFSO, objTextStream
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objTextStream = objFSO.OpenTextFile(strFileName, ForReading)
Response.Write ">"
Response.Write "" & objTextStream.ReadAll & " "
Response.Write ""
objTextStream.Close
Set objTextStream = Nothing
Set objFSO = Nothing
%>
<%Option Explicit%>
<%
Dim strURL
strURL = Request.QueryString("URL")
Dim strDir, strFileName
strDir = Request.ServerVariables("APPL_PHYSICAL_PATH")
Response.Write strDir
strFileName = Replace(strURL,"/","")
strFileName = strDir & strFileName
Const ForReading = 1
Dim objFSO, objTextStream
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objTextStream = objFSO.OpenTextFile(strFileName, ForReading)
Response.Write ">"
Response.Write "
Response.Write ""
objTextStream.Close
Set objTextStream = Nothing
Set objFSO = Nothing
%>
相关文章
- 名将杀武器如何选择 03-22
- POKI小游戏在线畅玩-poki免费秒玩入口网页版一键即开 03-22
- Twitter网页版快速登录-Twitter网页版中文界面 03-22
- 热血合击传奇法师带什么英雄厉害 03-22
- 杀戮尖塔2摧残卡牌有什么用 摧残卡牌图鉴效果 03-22
- 新仙魔九界官网首页入口 新仙魔九界官方网站 03-22