note 23599 added to function.include
| From: | unknownonline at lycos dot co dot uk | Date: | Tue, 23 Jul 2002 13:15:54 +0000 |
| Subject: | note 23599 added to function.include | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-33426@lists.php.net to get a copy of this message | ||
I have a question:
I have defined several modules on my site in a file called config.php as follows:
$mod1 = "name1";
$mod2 = "name2";
etc...
I have included this in my index.php page
(the file IS in the same directory):
<?php include ('config.php'); ?>
In the index page i aslo want to include pages as defined by the modules in the config.php file, so
i have used:
<?
$inc = @php include('$mod1.php');
if (!$inc) {
echo ("Can't find $mod1.php");
}
?>
but this doesn't work, i get the error message from the else statement. The files are there (in
the same dir) and the i have made sure the all is in lower case (due to the server)
any ideas
Cheers
--
http://www.php.net/manual/en/function.include.php
http://master.php.net/manage/user-notes.php?action=edit+23599
http://master.php.net/manage/user-notes.php?action=delete+23599
http://master.php.net/manage/user-notes.php?action=reject+23599