[PHP] Including a file from root directory when i'm in /music/lyrics

Experienced Elementalist
Joined
Mar 22, 2008
Messages
297
Reaction score
0
The topic should be self-explainable.

In the file /music/lyrics/forsta_ronden.php i want to include the files header.php and footer.php whos is in the root directory.

I've tryed
PHP:
<?php include 'header.php'; ?>

<?php include '/header.php'; ?>

<?php include '/../header.php'; ?>

<?php include '/../../header.php'; ?>

But none of them worked, i get the same error;
Code:
Warning: include(/../../header.php) [function.include]: failed to open stream: No such file or directory in E:\xampp\htdocs\the_old_farm\music\lyrics\forsta_ronden.php on line 2

Any suggestions?
 
It worked, but the links and the css got fucked up now.

The links are linking to pages in the music/lyrics directory and the css don't show up, in header.php i used
PHP:
<link rel="stylesheet" href="images/style.css" type="text/css" />

EDIT:
Fixed the links by adding "/" be4 them in header.php
 
Back