|
|
|
|
|
Re: GLOBALS.php "Bug"?? [message #165127 is a reply to message #165121] |
Thu, 28 April 2011 09:20   |
Ernesto
 Messages: 413 Registered: August 2005
Karma: 0
|
Senior Member |
remove from buddy list ignore all messages by this user
|
|
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.
Ginnunga Gaming
|
|
|
|