FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » GLOBALS.php "Bug"??
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: GLOBALS.php "Bug"?? [message #165127 is a reply to message #165121] Thu, 28 April 2011 13:20 Go to previous messageGo to previous message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma:
Senior Member
If you include something in a function, the result will be local unless specifically defined as global within the function.

So if you include the file outside the function, it will be global or "public" using .NET terminology.

If you want to be able to access a local variable outside the parent function you have to declare it global or supergloba, either by declaring it within the global scope, or defining it as global within the function.

If that makes sense?

From the bottom of my heart I do not mean any offense, but I think you are mistaking this as a structural issue whereas in you are just "doing it wrong" as the lolcat would have said. But, I have been wrong a million thousand billion times before and this could sure as hell be one of those times again.


[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: SQL Error has occurred...
Next Topic: NNTP Import Subject with Non-Ascii Characters
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Dec 01 05:47:34 GMT 2024

Total time taken to generate the page: 0.04161 seconds