Re: PHP auto global variables inside C extension
| From: | Zeev Suraski | Date: | Tue, 22 Mar 2005 11:20:10 +0000 |
| Subject: | Re: PHP auto global variables inside C extension | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-15535@lists.php.net to get a copy of this message | ||
At 09:02 22/03/2005, Arjun Jain wrote:
Hi everyone, I was wondering if there was any way in which the PHP auto global variables could be used inside the C extension code? Where does php store all the global variables?It stores them in the globals hash table. Take a look at php_session_start() in ext/session/session.c, and look for "_COOKIE", for an example of how you can access these. Once you have a reference to the $_FILES hash, you can iterate it to get each file (which is also a hash), and then lookup each element to obtain its value. Zeev