Skip to content

Instantly share code, notes, and snippets.

@JavaScript-Packer
Last active August 29, 2015 14:24
Show Gist options
  • Select an option

  • Save JavaScript-Packer/03ab2abeb9be59e57d3c to your computer and use it in GitHub Desktop.

Select an option

Save JavaScript-Packer/03ab2abeb9be59e57d3c to your computer and use it in GitHub Desktop.
ASP Classic function to load a local HTML5 file
<%@ LANGUAGE="VBSCRIPT" %>
<%
'fetch("webpage.htm")
sub fetch(file)
Dim x
Set fso = Server.CreateObject("Scripting.FileSystemObject")
set fs = fso.OpenTextFile(Server.MapPath(file), 1, true)
Do Until fs.AtEndOfStream
x = fs.ReadLine
Response.Write x
Loop
fs.close: set fs = nothing
end sub
%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment