RE: [PHP] include help please

From: Date: Thu, 31 Jul 2003 20:23:34 +0000
Subject: RE: [PHP] include help please
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-157803@lists.php.net to get a copy of this message
Hi, Take the quotes off around the $page variable. -Dan Joseph > -----Original Message----- > From: LoonySalmon [mailto:l33trus@hotmail.com] > Sent: Thursday, July 31, 2003 4:07 PM > To: php-general@lists.php.net > Subject: [PHP] include help please > > > 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? > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#157803) next »