最新下载
热门教程
- 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
%>
相关文章
- 燕云十六声生财之道万事知窦万金位置一览 07-04
- BLCoin(BLB币)的交易量 07-04
- XRP价格动态:加密货币老手将2美元买入XRP比作50美元购入比特币——XRP能否复制BTC的崛起之路? 07-04
- 云顶之弈摇摆灵动阵容搭配推荐 07-04
- 金铲铲之战s14堡垒莫甘娜阵容搭配指南 07-04
- 幻想生活i时之武器素材如何刷取 07-04