njfrese Posted January 2, 2009 Share Posted January 2, 2009 I have a virtual directory set up and some code in an include file can't seem to locate it. The php file and the include file below are in the root directory (i.e., C:\theRoot) of the site. The virtual directory is in a parallel directory on the server (i.e., C:\thedirectory) virtually called "jobs". The include code looks like this: <?php switch($_GET['page']) { case "home": include("about.php"); break; case "autocad": include("jobs/autocad.php"); break; } ?> "jobs" is actually a virtual directory that points to that parallel directory mentioned above (i.e., C:\thedirectory). Any idea why the include can't "see" that virtual directory? Link to comment https://forums.phpfreaks.com/topic/139251-include-problem-with-virtual-directory/ Share on other sites More sharing options...
Maq Posted January 2, 2009 Share Posted January 2, 2009 Shouldn't they be? ../jobs/autocad.php ../about.php Link to comment https://forums.phpfreaks.com/topic/139251-include-problem-with-virtual-directory/#findComment-728397 Share on other sites More sharing options...
njfrese Posted January 5, 2009 Author Share Posted January 5, 2009 Unfortunately, this doesn't work, either. I had tried it previously and just tried it again to be sure. The about.php file is located in the root directly, so that is fine as is and works perfectly. But when I try to use the virtual directory "jobs", no go. Link to comment https://forums.phpfreaks.com/topic/139251-include-problem-with-virtual-directory/#findComment-729906 Share on other sites More sharing options...
njfrese Posted January 5, 2009 Author Share Posted January 5, 2009 I also wanted to note that I CAN access the file itself directly using the virtual directory, i.e., www.mywebsite/thevirtualdirectory/theFile.php. However, the script doesn't see it. Link to comment https://forums.phpfreaks.com/topic/139251-include-problem-with-virtual-directory/#findComment-729933 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.