Re: included variables in a class function
| From: | daniel at electroteque dot org | Date: | Thu, 22 May 2003 05:16:57 +0000 |
| Subject: | Re: included variables in a class function | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-148503@lists.php.net to get a copy of this message | ||
did my example to use the parse_ini_file help ?
> well i threw an html comment in there so see if the file was included.
> once the page loaded i looked in the source and saw the comment from
> the included file.
> On Wednesday, May 21, 2003, at 10:08 PM, Jason Wong wrote:
>
>> 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.
>> */
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php