Page 1 of 1

$GET_HTTP_VARS['this'] and plain old $this question :)

Posted: Mon Oct 25, 2004 10:13 pm
by Mr Tech
Yo!

I have a page like this:

http://www.domain.com/page.php?this=hellothere

I found out a few months ago that some PHP servers require $GET_HTTP_VARS['this'] instead of $this to display the "hellothere" message on the page...

Now, my server that I write my PHP code on doesn't need $GET_HTTP_VARS['this'] for it to work so all my coding has $this. Hopefully I haven't lost you 8O

I replaced all the $this's with $GET_HTTP_VARS['this']'s in my script and I now want to test and make sure that I have replaced them all and that the script will work fine on a server that requries $GET_HTTP_VARS['this'].

Is there anyway I can add some temporary code that makes $GET_HTTP_VARS['this']'s work and $this's not work?

Thank you :)

Thanks

Ben

Posted: Mon Oct 25, 2004 10:16 pm
by kettle_drum
Edit your php.ini file so that register_globals is off.

Posted: Mon Oct 25, 2004 10:47 pm
by Mr Tech
Thanks will do that :)