|
|
|
|
|
| | |
|
Active Server Pages asp search engine active server page asp application components tutorial CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
Re: Urgent help! What am I doing wrong? |
From: |
ungos |
Date: |
11/21/1999 7:13:16 PM |
IP: |
4.16.62.190 |
Using <%=vpath%> should work, but with your current code, it will only print the content of "url".
If you want to actually display the HTML contents, create a header.htm and a footer.htm, then try the following:
<%
vpath = request.querystring("url")
a url containg the following text
will be sent through the formatter
searchtext = "content/archive"
This would be the HTML for
the top and bottom sections
of your template
headerfile = "header.htm"
footerfile = "footer.htm"
if the requested document is in a
directory that needs to be formatted...
if instr(vpath, searchtext) <> 0 then
print out the document
format (headerfile)
format (vpath)
format (footerfile)
the requested document is not in a
directory that needs to be formatted
so just send it to the proper place
else
response.redirect(vpath)
end if
%>
<%
SUB format(vpath)
somefile=server.mappath(vpath)
Set fs = CreateObject("Scripting.FileSystemObject")
Set thisfile = fs.OpenTextFile(somefile, 1, False)
tmpstr=thisfile.readall
response.write tmpSTR
thisfile.close
set thisfile=nothing
set fs=nothing
END SUB
%>
|
Previous Message
|
|

|
|
|
|
|
|
|
|
|
|