Re: include help please
| From: | LoonySalmon | Date: | Thu, 31 Jul 2003 20:14:57 +0000 |
| Subject: | Re: include help please | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-157807@lists.php.net to get a copy of this message | ||
thanks everybody
now it works
"Loonysalmon" <l33trus@hotmail.com> wrote in message
news:20030731200645.21961.qmail@pb1.pair.com...
> 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?
>
>