| |
<%
If Len(Request.Querystring("prod")) > 2 Then
' Declare variables for the File System Object and the File to be accessed.
Dim objFSO, objTextFile
' Create an instance of the the File System Object and assign it to objFSO.
Set objFSO = CreateObject("Scripting.FileSystemObject")
' Open the file
Set objTextFile = objFSO.OpenTextFile(Server.MapPath("products/" & Request.Querystring("prod") & ".html"))
Do While Not objTextFile.AtEndOfStream
Response.Write objTextFile.ReadLine & vbNewLine
Loop
objTextFile.Close' Close the file.
Set objTextFile = Nothing ' Release reference to the text file.
Set objFSO = Nothing ' Release reference to the File System Object.
Else
%>
|