PHP Include Paths
Posted
by Keiron Lowe
on Stack Overflow
See other posts from Stack Overflow
or by Keiron Lowe
Published on 2010-05-04T17:59:46Z
Indexed on
2010/05/04
18:08 UTC
Read the original article
Hit count: 263
Hi, I'm new to PHP and I'm having a problem when trying to link my CSS files using include.
Basically I need my files to link back to a certain directory no matter how far down the file is. I have tried using
<?php
include $_SERVER['DOCUMENT_ROOT'] . '/sysprogs/required/header.html';
?>
But header.html contains the links to my css files so the directory it ends up looking for the css files in is
http://localhost/SysProgs/software/CSS/style.css
instead of where I want it to go to which is
http://localhost/SysProgs/required/CSS/style.css
I hope that made sense and I hope you can help me
© Stack Overflow or respective owner