I'm trying to develop a web/intranet based OHS Management System for use at work, using PHP/MySQL. The folder structure is something like;
root directory
admin
articles
incs (i.e. "includes")
news
pages
policy
It is likely that some of these folders will have sub-folders at some stage.
My problem
I want to "include" selected root directory files, such as "config.php", in some of the include files. However, when live on the web, I can't work out the syntax to uplink to "config.php".
Including files from sub-directories appears to be no problem. For example, "header.incl" and "footer.incl" appear in upper level pages as they should.
Fully qualified URL's appear to be a "no-no" and when I use code such as the example below, there is simply a blank space on the screen where the include file is meant to display.
<?php include(../config.php); ?>
I've tried all kinds of variations without success. I've read through a variety of php functions, but none semm to address this issue.
I'd really appreciate some guidance!