Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
ini_set('display_errors', 1);
require_once 'include/local.conf';
require_once (COMMON_INCLUDE_PATH.'email/EmailTypes.php');
$mutex = sem_get(ftok(__file__, 'D'), 1, 0666, 1);
register_shutdown_function(function() use($mutex) {
foreach (glob("/data/home/shane/public_html/email/include/email/handlers/*.php") as $filename) {
$class = str_replace('.php', '', basename($filename));
$pid = pcntl_fork();
if ($pid == 0) {
echo PHP_EOL;
echo str_repeat("=", 100);
echo PHP_EOL;
echo "$class...";
require_once $filename;
$o = new $class();
echo "Success!";
echo PHP_EOL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment