Forum Moderators: coopster
<?php
include '../include/menulist.php';
?>
Since I use this template-file in many different subfolders, it doesn't work except for
"/folder1/file1.php" (since it's the same "tree-level")
and not for
"/file2.php" (root file, less "tree-level")
"/folder2/folder3/file3.php" (one more "tree-level")
I have tried many ways:
include ("@@('/include/menulist.php')@@");
and combinations of:
$_SERVER["DOCUMENT_ROOT"]
$_SERVER["HTTP_HOST"];
require_once
Please help!
(include works in normal files...)
[edited by: KiAnKo at 9:46 am (utc) on May 10, 2007]
Welcome to WebmasterWorld
If you want to use an absolute path (/include/menulist.php) you have to use the full path from the server root. I don't know what it is in your situation, but it might be something like:
/usr/htdocs/yourdomain/html
include('/usr/htdocs/yourdomain/html/include/menulist.php');