With Php when does an included file get included? Is it during a preprocessing stage or is it during script evaluation?
Right now I have several scripts that share the same header and footer code, which do input validation and exception handling. Like this:
/* validate input */ ... /* process/do task */ ... /* handle exceptions */ ...
So I’d like to do something like this
#include 'verification.php' /* process/do task */ ... #include 'exception_handling.php'
So if include happens as a preprocessing step, I can do the #include ‘exception_handling.php’ but if not, then any exception will kill the script before it has a chance to evaluate the include.
Thanks
PHP.net: include gives a basic example:
so include happens when its executed in code.
Edit: fixed url.