![]() |
Losing object?
I've been out of the loop for awhile, moving to other countries and all that noise... trying to find some spare time and the motivation to get back into programming here, and other than not having a clue where I even left off, I've just jumped back into working on my little public domain script... and hit a snag right quick.
I'm trying to reduce the codebase, and unnecessary classes, so I'm switching all my database calls for the session functionality to regular procedural functions. Except that this bit of code has me wondering what's up; PHP Code:
This code exists in a nested include, but there is no other $db in the global space to be messing with the function trying to locate it. Any clues why it's being nullified? -m |
Have you tried to use $GLOBALS['db'] ?
|
|
yeah, I wrote almost the same kind of a test script, and it pulled the object in just fine. I'm curious if it has something to do with the nested include... I checked for $db before I declared it, and it's not in use. Either way it shouldn't have had a conflict, because even if it was in use, it was being redeclared. *shrug* just one of those wierd things I guess.
-m |
| All times are GMT. The time now is 12:34 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0