Including a dynamic variable/file
| From: | Ryan A | Date: | Mon, 12 Apr 2004 23:50:07 +0000 |
| Subject: | Including a dynamic variable/file | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-183187@lists.php.net to get a copy of this message | ||
Hi,
I created a "control panel" for a client, he wanted the option of changing
the template as whenever he pleases.
Since he knows HTML I made it very simple by adding a header and a footer.
He simple fills in 2 variables in Config.php:
$client_header
$client_footer
In my scripts I am calling it like this:
<?php
include "../Config.php";
include "$client_header";
?>
but it gives me this error:
Warning: main() [function.main]: Failed opening '' for inclusion
(include_path='.;C:/php/includes;C:/php/php/class') in
c:\php\www\project14342\client\index.php on line 3
Running tests I see taht Config.php IS getting included...
Any ideas?
Thanks,
-Ryan