Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

INCLUDE VIRTUAL 1

Status
Not open for further replies.

801119

Programmer
Apr 10, 2000
311
SE
Hia all,

I'm using this way of choosing poem to be displayed, but since I'm considering letting other peoples peoms in too I want to use another way cause as soon as it's uploaded (via asp) and i'm using another script (found on the net, of course) to display all files in a certain dir. I'm about to rewrite that code to add links for those poems. But I want to use something similar to "include", but not sure what or how..
all links look like this right now: poems.asp?poem=poemname

Code:
<%  poem = Request.QueryString(&quot;poem&quot;)
If Poem = &quot;&quot; or poem = &quot;privacy&quot; Then %>
<!-- #INCLUDE VIRTUAL=&quot;/poetry/privacy.txt&quot;-->
<%  End if %>
<%  If poem = &quot;lifeindawn&quot; Then    %>
<!-- #INCLUDE VIRTUAL=&quot;/poetry/lifeindawn.txt&quot;-->
<%  End if %>
<%  If poem = &quot;andall&quot; Then %>
        <!-- #INCLUDE VIRTUAL=&quot;/poetry/andall.txt&quot;-->
<%  End if %>
<% If poem = &quot;intheend&quot; Then %>
        <!-- #INCLUDE VIRTUAL=&quot;/poetry/intheend.txt&quot;-->
<% End If %>
My codes look like something a kid wrote
I have absolutely no idea what I am talking about
Somehow I still manage to make it work
 
whichfile=Request.QueryString(&quot;poem&quot;)
Call ReadDisplayFile(whichfile)
SUB ReadDisplayFile(FileToRead)
whichfile=server.mappath(FileToRead)
Set fs = CreateObject(&quot;Scripting.FileSystemObject&quot;)
Set thisfile = fs.OpenTextFile(whichfile, 1, False)
tempSTR=thisfile.readall
response.write tempSTR
thisfile.Close
set thisfile=nothing
set fs=nothing
end sub Saturday 12.00
im6.gif
im2.gif
im2.gif
20.00
im5.gif
im4.gif
im7.gif
3.00am
im8.gif
Sunday [img http
 
just what I was looking for =) cheers mate and a star... My codes look like something a kid wrote
I have absolutely no idea what I am talking about
Somehow I still manage to make it work
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top