include file

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
enemeth
Forum Commoner
Posts: 66
Joined: Tue Mar 27, 2007 8:55 am

include file

Post by enemeth »

hi there me again ;)

is there a specific way to make the include file take the file from a root directory ,

lets say i have this

root/members

i have a header.php in the root directory , and then i have a page in the members folder that needs to link to the root

like this :

Code: Select all

<?php
include 'header.php';
//members page 

?>
now this page is in the members folder, i want that include to take the header.php file from the root .... i tried the

include '../header.php'

but it doesnt work is there another way to get the include to go to the root to obtain that file ?

Elaine
thanks
enemeth
Forum Commoner
Posts: 66
Joined: Tue Mar 27, 2007 8:55 am

Post by enemeth »

neverming it worked !

thanks again :)

Elaine
Post Reply