what i need is how do i include a file in this situation this file is in foldet "test" and the file i want to include is in root how do i do this
Personally, I define a constant ROOT in a root.php script file which then is included with include_once() in every file. ROOT stores a relative path to the root, for example '../' for a first level sub directory. Then you can always access any point in the hierarchy, for example in a file root/classes/sample_class.php you can include a file root/template/sample_template.php: include_once("root.php"); include(ROOT."templates/sample_template.php"); PHP: Hope it makes sense.