khadem1386 Posted February 25, 2007 Share Posted February 25, 2007 hiI have a problem with this lie of code in asp.<!--- #include virtual=/manager/utilities/config.asp -->This show a path.this path is true and I check it.but the server (inXP IIs or I server) return file not found!if I use <!--- #include File="/ . . ."it work.but I can'nt use .. because many of line in this project have #include virtual.where is problem When I give (file not found)I think (#include virtual) is not simple as file= methidethank for your help Link to comment Share on other sites More sharing options...
pulpfiction Posted February 26, 2007 Share Posted February 26, 2007 "Include virtual" tells ASP where the include file is relative to the web root directory, "include file" tells ASP where the file is relative to the current directory. Use either of the following tags to include files in ASP:<!-- #include virtual="/includes/header.asp" -->(tells ASP where the file is located relative to the root web directory)<!-- #include file="../includes/header.asp" -->(tells ASP where the file is relative to its current directory)[bottom of page]http://www.hardcoder.com/scripting/php/include_files.php#asp Link to comment Share on other sites More sharing options...
khadem1386 Posted February 27, 2007 Author Share Posted February 27, 2007 thank for your help.but what is mind by root dir is server. can I use (mapPatH). for "virtual"for exampel:f:\hostmaster\site.com\wwwroot\maneager\.....I have many if in difernt folder thad have some include file. Link to comment Share on other sites More sharing options...
pulpfiction Posted February 27, 2007 Share Posted February 27, 2007 "wwwroot" is your root directory, irrespective of where your current page is, when you use virtual, you need to give the path from inside wwwroot<!--#include virtual="./maneager/subfolder/filename.asp"--> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now