help with page 223 - file includes
Hello, everyone.
I'm having trouble understanding the bottom of page 223. It says when using include files we have to guard against calling on the same function twice. It offers a solution - some code to guard against the problem.
... declare a variable in every include file you create:
$COMMON_INCLUDED=1;
and then test for it at the beginning of the include:
if (!$COMMON_INCLUDED) $COMMON_INCLUDED=1;
I don't understand this very well. Could someone please explain this to me? Does this mean that each file you include should have $COMMON_INCLUDED=1; in it? I don't understand what the 2nd line of code does or what it means.
Any help would be greatly appreciated.
__________________
An overworked Web Developer who\'s expected to know everything yet given time to study nothing.
|