I just had a go at <--!includes... etc without much success. I created a new ASP file that simply declares a variable named 'path' then assigned the appropriate filepath to it. Then I used s-s includes in the code of my main page and set the connection string value to 'path'.
I think I've understood the principal correctly haven't I? It's most likely a lack of experience ony part as I'm relatively new to this and have probably got some...
User Profile
Collapse
-
Thanks jhardman - great idea. I've also been advised to explore server.mappath as a way of detecting the host server.
I prefer the 'includes' solution because of its apparent simplicity; I've not used includes previously but I am aware of the concept so I'll give it a go.
Cheers,
Al.Leave a comment:
-
BigAl42 started a topic Auto detect whether code is being executed on localhost [IIS] or ISP web serverin ASP ClassicAuto detect whether code is being executed on localhost [IIS] or ISP web server
My project involves a large number of ASP pages that reference an Access database. I am testing the system first via IIS before publishing it to the web server.
The connection string is specific to the database location i.e. C:/inetepub/.../*.mdb etc for IIS testing and //web/content/.../*.mdb etc for the web server. Therefore I have to edit all of the files before publishing, then edit them back to continue with local deevelopment....
No activity results to display
Show More
Leave a comment: