Hi guys I am in need of some serious help, I have asked everywhere and no one can find the answer to my problem yet.
I am fairly new to php and would really appreciate it if anyone can help.
Basically I recently bought some script that goes with my website I wanted and in there was a custompage.php file where I can have my pages looking the same as all the rest but with my own content that I code in. The coding looks like this:
[php]<?
include("./includes/egl_inc.php");
$out[body].="
Custom Page |
This is a custom page. You may add anything you want here. |
";
include("$config");
?>[/php]
The problem I have and that no one can seem to solve is that when I go up a level from the root folder for e.g. I wanted to create a new file and have pages in there to keep things better organised.
Now when i add the extra . to the include("./includes/egl_inc.php"); part of the coding all is well but the error I am constantly getting is from the
[php]include("$config");[/php]
If dreamweaver or I change the directory …/ ./ in any way it doesnt work if i leave it as it is it doesnt work I have tried everything others mentioned doing the [php]Include "{$_SERVER[‘DOCUMENT_ROOT’]}[/php] which again works fine on the egl_inc page but not the $config section.
What winds me up is that the people who did the script can’t seem to work out the issue and are offering me other ways around it for more money and they have already had a fortune off me.
There is a config.php file on my root folder however this just seems to be config of my server that it is set up on.
I think this $config section shows all of how the page should display so there is a folder /theme/neo-green/html.php
In that folder seems to be all the html code of how my page looks and i am assuming that somehow this $config is pulling that out and into the files. As i say works fine on the root folder but if i try have files any where else in other folders no way will it have it and i get the following error message when i view webpage
Warning: main(./config.php) [function.main]: failed to open stream: No such file or directory in /websites/123reg/LinuxPackage23/lf/sf/lo/lfsfloorings.co.uk/public_html/DOA360/includes/globals.php on line 0