include help please
| From: | LoonySalmon | Date: | Thu, 31 Jul 2003 20:06:42 +0000 |
| Subject: | include help please | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-157802@lists.php.net to get a copy of this message | ||
i am looking to use includes on my page,
this is the code that i want to use to call my files with:
INDEX.PHP
<?php
require 'files.inc.php';
$page = '$home';
include '$page';
?>
FILES.INC.PHP
<?php
$home = 'home.html';
$forum = 'forum/index.php';
$contact = 'contact.html';
?>
I try to load up index.php and this is what i get
Warning: main($page) [function.main]: failed to create stream: No such file
or directory in C:\swamp\www\site\index.php on line 109
Warning: main() [function.main]: Failed opening '$page' for inclusion
(include_path='.;c:\swamp\php\includes;C:\swamp\www') in
C:\swamp\www\site\index.php on line 109
the problem must be when i am trying to include the $page variable
could somebody please help me?