PHP: "Footer function"?
<p>I have a project. It has a good number of PHP files. Each of these files includes a standard header. They don't include a standard footer.</p>

<p>Now I want to do something just before the end of every page. I can go through each page and add the footer code, but I was wondering if there is an easier way (and I think I've seen something like it before, though I might be mistaken).</p>

<p><strong>Is there a way to set a "hook" or "trigger" function that will be executed at the end of a page, from the included header PHP script? I'm thinking of something like <a href="http://php.net/set_error_handler" rel="nofollow">set_error_handler</a> but to handle a page close event. Or like C's <a href="http://www.cprogramming.com/fod/atexit.html" rel="nofollow">atexit</a> function.</strong></p>
