Re: included variables in a class function

From: Date: Thu, 22 May 2003 05:08:38 +0000
Subject: Re: included variables in a class function
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-148501@lists.php.net to get a copy of this message
On Thursday 22 May 2003 11:17, Man in the Box wrote: [snip] > here is an example of what im talking about. > > Here is an example of my config file: > > <?php > > $config[blarg][foo]= 'some value'; > $config[blarg][goo]= 'some other value'; > $config[scooby][doo]= 'wik'; > $config[blarg][too]= 'also wik'; > > ?> > require ("path/to/config/php"); // NOTE: I have already made certain > that the file is successfully being included How did you ascertain that it was being included successfully? This trivial example works for me <?php function config() { require("/path/to/config.php"); // or whatever your config file is called print_r($config); } config(); ?> -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* The heart is wiser than the intellect. */

« previous php.general (#148501) next »