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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use the same asp code in different websites

Status
Not open for further replies.

jslmvl

Vendor
Jan 26, 2008
268
0
0
GB
Hi,

I got one remote website and two local websites. All the .asp files are the same in 3 websites.
In the remote website, there is a file aaa.asp, its url is In the first local website, the url of the same file is In the second local website, the url of the same file is My question is: In any .asp files (may be in sub-folders) of any above website, how can I get the url of aaa.asp by use the same code?

I will be very appreciated for any help.
 
Make everything relative to aaa.asp. Just use ./ in the filename instead of specifying the full path.
 
Thank you.
However, the .asp files are not in the same folder.
 
Are the websites and files on the physical hardware

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
ChrisHirst,

Sorry, I don't know what you mean by physical hardware......of cause all the files should be in the harddisk.
 
Physical hardware would be on the same machine


ASP can include the output (the HTML source) from a remote URI but to run script code the included file MUST be in the website file structure.
If files are on the same machine server.execute can be used but you have to be aware that any variables defined or set in the executed script will NOT be available to the parent page, but parent variables will be available to the executed script. This is because scripts (and includes) are "pre-processed"

This article may help ->
Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top