Joined September 2013
·

jmcgdz

Nashua, NH
·
·

Posted to How to use Monolog in any PHP file over 1 year ago

@laurent_guigo

For this example, you will need to do something like:


splautoloadregister(function ($class) {
$file = $DIR.'/relative/path/to/psr/log/'.strtr($class, '\', '/').'.php';
if (file_exists($file)) {
require $file;
return true;
}
});
</pre>
Achievements
1 Karma
0 Total ProTip Views