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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Mr Tech
Forum Contributor
Posts: 424
Joined: Tue Aug 10, 2004 3:08 am

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

Post 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
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

Edit your php.ini file so that register_globals is off.
User avatar
Mr Tech
Forum Contributor
Posts: 424
Joined: Tue Aug 10, 2004 3:08 am

Post by Mr Tech »

Thanks will do that :)
Post Reply