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!

Add a QueryString value to filepath?? 1

Status
Not open for further replies.

Sajtz

IS-IT--Management
Apr 23, 2002
75
EU
From my firstpage.asp i send this value to nextpage.asp
<a href =&quot;nextpage.asp?file=server01.txt&quot;>

in my nextpage.asp i need to invoke this variable into a filepath using Request.QueryString(&quot;file&quot;).

servername = Request.QueryString(&quot;file&quot;).

So in my path i need to use the variable sent from firstpage.asp in the filepath. It should then look like this C:\Inetpub\ , with the variable servername used in the filepath

how do I get the servername into the filepath?
 
path_name=&quot;C:\Inetpub\ & servername

but a better way maybe to not use the full path name since you would need to change it when putting it on to a server so use a virtual directory i.e.
If its in the same directory just use the file name, if its in a directory below use path_name=&quot;/directory/&quot; & servername.
If its in a diretory above use &quot;../directory&quot; - this goes up one directory etc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top