Skip to content

Instantly share code, notes, and snippets.

@Daniel15
Created January 31, 2012 05:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Daniel15/1709107 to your computer and use it in GitHub Desktop.
Save Daniel15/1709107 to your computer and use it in GitHub Desktop.
Get content of currently executing page (ASP / VBScript)
Dim sPath
Dim oFS
Dim oTextStream
Dim sFile
sPath = Server.MapPath(Request.ServerVariables("SCRIPT_NAME"))
Set oFS = CreateObject("Scripting.FileSystemObject")
Set oTextStream = oFS.OpenTextFile(sPath, 1)
sFile = oTextStream.ReadAll()
Set oFS = Nothing
Set oTextStream = Nothing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment