Home | Advertising Info88 USERS CURRENTLY ONLINE   
   Site Search Contact Us Saturday, July 02, 2022  

Use ASP to determine the Physical Path Of Your Virtual Website

Here is an example if you are hosting your Domain on some random ISP and you want to know the structure of the web site without asking them. 

The Mapath Method Is your ticket.

Run the following code from within the root of your site and it will clue you in to the physical path.

<p align="center"><font size="4" face="Arial"><b>
The Physical path to this virtual website is:

<font color="#FF0000" size="6" face="Arial">
<%= Server.MapPath("\")%>

Server.MapPath is a great tool, but it isn't always the best solution. It is great for applications that need to work from any directory or site they are thrown into but there are times when you just don't need to use it. All Server.MapPath really does is figure out the physical path on the fly. Using it is really no different then knowing the path except every time Server.MapPath is called you are using server resources to determine the physical path. Also. when called from all sorts of different directories Server.MapPath will report back all sorts of different paths making it pretty difficult to use with an application that uses include files for specifying the database path. The solution...

Just use Server.MapPath once to determine the physical path ..
There is a Physical Path despite what your host may have told you.
   Active Server Pages Rule The World
Contact Us  
All artwork, design & content contained in this site are Copyright 1998 - 2022 PowerASP.com and Christopher J. Williams
Banner ads ,other site logos, etc are copyright of their respective companies.
STATS Unless otherwise noted - All Rights Reserved.

vbscript active server pages ASP vbscript SQL database informix oracle SQL Server Perl CGI Delphi PHP source code code sample samples program CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspclassifieds.com, www.powerasp.com,www.cjwsoft.com,www.aspphotogallery.com,www.codewanker.com,www.aspprotect.com,www.aspbanner.com