Globals with require() has no value
| From: | XFred . | Date: | Fri, 04 Aug 2000 13:23:56 +0000 |
| Subject: | Globals with require() has no value | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-10122@lists.php.net to get a copy of this message | ||
Sorry for asking again but I really need help...
Why a global defined into a require()ed file has no value
in an other require()ed one ...?
for exemple:
-----main file------------
<?
require("globals.php3");
require("IB_fcts.php3");
echo $gsp; //this works here
//valid script follows ..
?>
----globals.php3-------
<?
$gsp="/usr/interbase/bases/gsp.gdb";
?>
----IB_fcts.php3------
<?
echo $gsp; // no output
function my_fct()
{
global $gsp;
echo $gsp; // no output ..} ?> I would be grateful to anyone who could help .. thx. ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com