Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.