How to setup include for all PHP scripts of a directory?
<p>I am new to PHP and I have a very basic questions. I'd like to setup PEAR logging across all PHP files of my project. How do I accomplish that? Right now, in every single file the following lines:</p>

<pre><code>// Repeated lines
require_once 'Log.php';
$conf = array('mode' =&gt; 0600, 'timeFormat' =&gt; '%X %x');
$logger = Log::singleton('file', 'out.log', 'ident', $conf);

// Some logging...
$logger-&gt;log("Log entry");
</code></pre>

<p>Repeating the 3 lines doesn't seem to be the right solution to me. I actually have the same issues with my Propel generated classes. How can I resolve this?</p>

<p>Martin</p>
