i'm in the process of converting a bunch of ASP pages over to PHP but have run into an annoying snag.
In teh old ASP pages, there are a bunch of include files, many of which resided in the root folder, so they can be accessed like this
now this works great because i can use the same piece of code in any page, no matter how deep they reside in the directory tree. ASP knows to go to the root folder and then to the filename.
However, in PHP, this doesn't work, when i use:
i get an error message saying the include file cannot be found. This is a royal pain, since i now have to go to each file and put in the path like this:
is there some setting in PHP that i'm missing that would allow me to use includes like i did in ASP? BTW its on an IIS server.
Thanks
In teh old ASP pages, there are a bunch of include files, many of which resided in the root folder, so they can be accessed like this
Code:
<!--#include virtual="/filename.htm"-->
now this works great because i can use the same piece of code in any page, no matter how deep they reside in the directory tree. ASP knows to go to the root folder and then to the filename.
However, in PHP, this doesn't work, when i use:
Code:
<?php include("/filename.htm") ?>
Code:
<?php include("../filename.htm") ?> if it's in a sub-directory and
<?php include("../../filename.htm")?> if it's two levels down, etc...
is there some setting in PHP that i'm missing that would allow me to use includes like i did in ASP? BTW its on an IIS server.
Thanks