Re: problems with include()
| From: | Al | Date: | Thu, 30 Jan 2003 22:52:30 +0000 |
| Subject: | Re: problems with include() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-133705@lists.php.net to get a copy of this message | ||
Looks like you are only backing up 2 levels when you need 3.
Why not try something like:
$root= "the absolute path to your root folder";
Then simply:
include ($root . "mainfile.php");
etc.
Daniel Negron/Kbe wrote:
I have this code : <?php if(!isset($mainfile)) { include("mainfile.php"); } include("open_session.php"); include('config.php'); include ('header.php'); Coverted html in here. include ('footer.php'); ?> which works great from the root dir where these files are stored. [all content is showing properly] If I move the file to its final destination, let say ... http://root_dir/intranet/training/final_folder I change the code to match <?php if(!isset($mainfile)) { include("../../mainfile.php"); } include("../../open_session.php"); include('../../config.php'); include ('../../header.php'); Coverted html in here. include ('../../footer.php'); ?> ALL I get is the Converted HTML printed on the screen. I have tried many variations of traversing the directories, but this does not seem to be working. Can anyone help ? Thank you, **DAN**