[TriLUG] mysql close statements
Brian A. Henning
lugmail at cheetah.dynip.com
Fri Feb 20 15:24:05 EST 2004
AFAIK, php includes work just like C-style includes, in that the
preprocessor treats it as if the contents of the included file were present
in the parent file at the location of the include.
That was a little convoluted, so here is a brief example:
parent.php:
a = b;
include("included.php");
c = d;
included.php:
e = f;
g = h++;
i = j--;
The preprocessor behaves as though parent.php contained:
a = b;
e = f;
g = h++;
i = j--;
c = d;
In other words, there is no scope imposed on included files.
Hope this is sensible,
~Brian
In response to:
> If you're using PHP, the connections will close automatically when the
> script ends. However, with and included script I'm not sure whether the
> connection would close after the include file was finished or after the
> calling script was completed. It couldn't hurt to close them
> after they're
> needed just to be safe.
More information about the TriLUG
mailing list