RE: [PHP] require() problem
| From: | Ralph Guzman | Date: | Tue, 08 Aug 2000 02:22:00 +0000 |
| Subject: | RE: [PHP] require() problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-10567@lists.php.net to get a copy of this message | ||
this sounds like a problem with your path. is the required file that you are
specifying in $configfile. in a different directory? This example assumes
that the $configfile is in the same directory.
also, unless your $configfile is supposed to run/insert PHP/HTML code, you
should be using include. for example:
$configfile = "config.inc.php3";
include("$configfile");
-----Original Message-----
From: Andre Fadel [mailto:fadel@fee.unicamp.br]
Sent: Monday, August 07, 2000 7:13 PM
To: php-general@lists.php.net
Subject: [PHP] require() problem
I was just wondering if require will take variables instead of file
names. I have this on my script:
require($configfile);
But I'm getting a error like this:
Fatal error: Failed opening required 'config.inc.php3' (include_path='')
Although the $configfile variable does not contain that, if i tell it to
print $configfile right before the require statement, i get something
different (the right stuff!!).
So, what's the deal with that? What could be wrong?
Thanks a lot!
--
André Fadel
fadel@fee.unicamp.br
Hoje E Sempre GUARANI!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net