Re: Code Advice
| From: | Jason Young | Date: | Wed, 06 Nov 2002 19:50:22 +0000 |
| Subject: | Re: Code Advice | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-123067@lists.php.net to get a copy of this message | ||
I just saw that post...
I feel completely stupid at this point, might I point out.
You're right - register_globals is by default 'on' on this particular server I"m working on (I don't do a lot of PHP work on it), cuz its an older version and I haven't been bothered enough to upgrade it... I haven't tested it on something that has register_globals set to on.
So yes.. indeed my code did absolutely nothing. Who wants to hire me? hah.
Thanks for all the help, though.. I definately learned a few things and got some decent code in return to fiddle with!
Thanks to all, apologies for the brain-death.
-Jason
Ernest E Vogelsinger wrote:
At 20:40 06.11.2002, Jason Young spoke out and said: --------------------[snip]--------------------register_globals is definately off.. Maybe its a PHP miracle, as Ernest suggested.. maybe Rasmus or someone else on the PHP dev team has something to say about it, but it works.. maybe you all could use it :-D--------------------[snip]-------------------- Jason, as Chris already pointed out, this code doesn't do what you intend to do. You don't get an error because you do not access the variable name directly - at least not the variable your code generates (which is $0, $1, $2, etc). If you did you'd get a decent parser error - but unfortunately your data hides behind these identifiers. If register_globals is off I have absolutely no idea why you still have them available. Please recheck your testing code - I'm sure you'll notice the glitch...