Re: [PHP] A question on the term CFG.
wayne wrote: On Mon, 2005-08-08 at 13:48 +0200, Jochem Maas wrote: wayne wrote: On Sun, 2005-08-07 at 23:14 +0200, Jochem Maas wrote: Hi Jochem, SNIP Hi Jochem, Would you mine if I send you the beginning part of the php script,about 20 lines of code, to see if I'm missing something? I would as it happens - but send to the list and I'll have a look :-) Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] A question on the term CFG.
That isn't created by PHP, it must be declared in the code somewhere. Maybe there is an auto_prepend_file set? http://www.php.net/manual/en/ini.core.php#ini.auto-prepend-file Chris wayne wrote: First, I'm new to PHP. I have a script that has a piece of code that looks like this - require_once($CFG-wwwroot . '/lib/mylib.php'); My question is this, I'm trying to find out how the class $CGF was initiated.There are no include or require statement before the statement. Is $CFG a global variable? If how does it get initiated? Tnaks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] A question on the term CFG.
Or if it's PHP 5 they might be using an __autoload() magic function which gets called whenever a class that isn't declared is instantiated. That function could be require()ing another file. Jasper Chris wrote: That isn't created by PHP, it must be declared in the code somewhere. Maybe there is an auto_prepend_file set? http://www.php.net/manual/en/ini.core.php#ini.auto-prepend-file Chris wayne wrote: First, I'm new to PHP. I have a script that has a piece of code that looks like this - require_once($CFG-wwwroot . '/lib/mylib.php'); My question is this, I'm trying to find out how the class $CGF was initiated.There are no include or require statement before the statement. Is $CFG a global variable? If how does it get initiated? Tnaks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] A question on the term CFG.
On 8/7/05 4:24 PM, Jasper Bryant-Greene [EMAIL PROTECTED] wrote: Or if it's PHP 5 they might be using an __autoload() magic function which gets called whenever a class that isn't declared is instantiated. That function could be require()ing another file. Well, if it is PHP 5, then you can use introspection to find out where that class is declared: $className = get_class ($CFG); $cls = new ReflectionClass ($className); Echo Class . $className . is defined in . $cls-getFileName() . between lines . $cls-getStartLine() . and . $cls-getEndLine(); Marco Jasper Chris wrote: That isn't created by PHP, it must be declared in the code somewhere. Maybe there is an auto_prepend_file set? http://www.php.net/manual/en/ini.core.php#ini.auto-prepend-file Chris wayne wrote: First, I'm new to PHP. I have a script that has a piece of code that looks like this - require_once($CFG-wwwroot . '/lib/mylib.php'); My question is this, I'm trying to find out how the class $CGF was initiated.There are no include or require statement before the statement. Is $CFG a global variable? If how does it get initiated? Tnaks. -- Marco Tabini President CEO Marco Tabini Associates, Inc. 28 Bombay Ave. Toronto, ON M3H 1B7 Canada Phone: +1 (416) 630-6202 Fax: +1 (416) 630-5057 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] A question on the term CFG.
wayne wrote: First, I'm new to PHP. I have a script that has a piece of code that looks like this - require_once($CFG-wwwroot . '/lib/mylib.php'); My question is this, I'm trying to find out how the class $CGF was initiated.There are no include or require statement before the statement. Is $CFG a global variable? If how does it get initiated? Tnaks. you already had a couple of really good tips on finding the relevanty class - regarding 'CFG' Ill bet the guy that wrote it meant 'config', thats often shorten to 'cfg' or 'conf' - programmers like to type a little as possible :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] A question on the term CFG.
Hi Marco, The version of php I have is 4.3.10. Is there something similar to the below example in the version I have? Thanks. On Sun, 2005-08-07 at 16:39 -0400, Marco Tabini wrote: On 8/7/05 4:24 PM, Jasper Bryant-Greene [EMAIL PROTECTED] wrote: Or if it's PHP 5 they might be using an __autoload() magic function which gets called whenever a class that isn't declared is instantiated. That function could be require()ing another file. Well, if it is PHP 5, then you can use introspection to find out where that class is declared: $className = get_class ($CFG); $cls = new ReflectionClass ($className); Echo Class . $className . is defined in . $cls-getFileName() . between lines . $cls-getStartLine() . and . $cls-getEndLine(); Marco Jasper Chris wrote: That isn't created by PHP, it must be declared in the code somewhere. Maybe there is an auto_prepend_file set? http://www.php.net/manual/en/ini.core.php#ini.auto-prepend-file Chris wayne wrote: First, I'm new to PHP. I have a script that has a piece of code that looks like this - require_once($CFG-wwwroot . '/lib/mylib.php'); My question is this, I'm trying to find out how the class $CGF was initiated.There are no include or require statement before the statement. Is $CFG a global variable? If how does it get initiated? Tnaks. -- Marco Tabini President CEO Marco Tabini Associates, Inc. 28 Bombay Ave. Toronto, ON M3H 1B7 Canada Phone: +1 (416) 630-6202 Fax: +1 (416) 630-5057 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] A question on the term CFG.
Hi Jasper, I thought about this and so I did a grep on autoload and came up empty. Is there a different way of checking for the magic function? Thanks On Mon, 2005-08-08 at 08:24 +1200, Jasper Bryant-Greene wrote: Or if it's PHP 5 they might be using an __autoload() magic function which gets called whenever a class that isn't declared is instantiated. That function could be require()ing another file. Jasper Chris wrote: That isn't created by PHP, it must be declared in the code somewhere. Maybe there is an auto_prepend_file set? http://www.php.net/manual/en/ini.core.php#ini.auto-prepend-file Chris wayne wrote: First, I'm new to PHP. I have a script that has a piece of code that looks like this - require_once($CFG-wwwroot . '/lib/mylib.php'); My question is this, I'm trying to find out how the class $CGF was initiated.There are no include or require statement before the statement. Is $CFG a global variable? If how does it get initiated? Tnaks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] A question on the term CFG.
Well if you're using 4.3.10 as you said in your other post then __autoload is not supported anyway. A grep on autoload would've turned it up. I'm assuming you've tried a grep for CFG to find the declaration? Jasper wayne wrote: Hi Jasper, I thought about this and so I did a grep on autoload and came up empty. Is there a different way of checking for the magic function? Thanks On Mon, 2005-08-08 at 08:24 +1200, Jasper Bryant-Greene wrote: Or if it's PHP 5 they might be using an __autoload() magic function which gets called whenever a class that isn't declared is instantiated. That function could be require()ing another file. Jasper Chris wrote: That isn't created by PHP, it must be declared in the code somewhere. Maybe there is an auto_prepend_file set? http://www.php.net/manual/en/ini.core.php#ini.auto-prepend-file Chris wayne wrote: First, I'm new to PHP. I have a script that has a piece of code that looks like this - require_once($CFG-wwwroot . '/lib/mylib.php'); My question is this, I'm trying to find out how the class $CGF was initiated.There are no include or require statement before the statement. Is $CFG a global variable? If how does it get initiated? Tnaks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php