Re: Globals unavailable, require oddity

From: Date: Thu, 13 Oct 2005 17:01:58 +0000
Subject: Re: Globals unavailable, require oddity
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-19590@lists.php.net to get a copy of this message
On 13.10.2005 20:51, Marcus Bointon wrote:
in a.inc.php: <?php $a = 1; ?> in b.class.php: <?php require 'a.inc.php'; class b {
     function test() {
         global $a;
         echo $a;
     }
} ?>
Works fine here.
<?php require_once 'Config.php'; $a = new Config; ?> Fatal error: Class 'Config' not found
Use absolute path everywhere ? I can't reproduce it either. -- Wbr, Antony Dovgal

« previous php.internals (#19590) next »