Globalising a variable...

  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8211
  • Loc: USA
  • Status: Offline

Post May 21st, 2009, 10:19 pm

How do you globalise a variable?
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post May 21st, 2009, 10:19 pm

  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Joined: May 22, 2004
  • Posts: 3415
  • Loc: Richland, WA
  • Status: Offline

Post May 21st, 2009, 10:36 pm

http://us2.php.net/manual/en/language.v ... .scope.php
#define NULL (::rand() % 2)
  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8211
  • Loc: USA
  • Status: Offline

Post May 21st, 2009, 11:26 pm

How do I check if $GLOBALS are registered?
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Joined: May 22, 2004
  • Posts: 3415
  • Loc: Richland, WA
  • Status: Offline

Post May 21st, 2009, 11:48 pm

Not quite sure what your asking. You can check to see if register globals is off or on by using this:
Code: [ Select ]
echo 'register_globals = ' . ini_get('register_globals') . "\n";
#define NULL (::rand() % 2)
  • Nightslyr
  • Proficient
  • Proficient
  • No Avatar
  • Joined: Sep 21, 2005
  • Posts: 274
  • Status: Offline

Post May 22nd, 2009, 6:56 am

Turning register_globals on is a bad idea: http://roshanbh.com.np/2008/02/register ... oblem.html
  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8211
  • Loc: USA
  • Status: Offline

Post May 22nd, 2009, 7:40 am

Nightslyr wrote:
Turning register_globals on is a bad idea: http://roshanbh.com.np/2008/02/register ... oblem.html

Alright... I stopped the idea of using globals yesterday anyway since it didn't do what I wanted...

Thanks anyway.
"Bring forth therefore fruits meet for repentance:" Matthew 3:8

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 197 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.