开发学院WEB开发ASP 让使用者可以看到你的ASP的原代码 阅读

让使用者可以看到你的ASP的原代码

 2000-11-05 10:13:54 来源:WEB开发网   
核心提示:假如你写了一个asp的程序,希望让你的使用者看到ASP的原始代码,你可以利用FileSystemObject这个对象送出程序原始代码.<%@ Language=VBScript %><%Option Explicit %><%Dim strURLstrURL = Request.Query
假如你写了一个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 "<HTML><BODY>"
Response.Write "<XMP>" & objTextStream.ReadAll & "</XMP>"
Response.Write "</BODY></HTML>"

objTextStream.Close
Set objTextStream = Nothing
Set objFSO = Nothing

%>



Tags:使用者 可以 看到

编辑录入:爽爽 [复制链接] [打 印]
[]
  • 好
  • 好的评价 如果觉得好,就请您
      0%(0)
  • 差
  • 差的评价 如果觉得差,就请您
      0%(0)
赞助商链接