Posted by James on 10/04/16 11:05
I *really* appreciate everybody's previous input. I may be a highly
experienced programmer, but am relatively new to PHP.
OK, I figured out what was going on. Google enough and read enough and
the light goes on finally.
The problem was not the "require_once" but a scoping problem.
Specifically, I was calling "require_once" /from within a function/.
Bad! Bad! Bad!
The included source file was also including other files... thus the
global class instance was just fine... it was simply hidden due to
scoping rules.
Yikes! I was really pulling my hair out when entire global functions
were "disappearing" due to the screwed up scope.
I finally figured out the problem in the "User Contributed Notes"
section of the PHP manual (http://www.php.net/language.variables.scope).
THANK YOU again...
[Back to original message]
|