Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
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) {
@sem_release($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) {
sem_acquire($mutex);
echo PHP_EOL;
echo str_repeat("=", 100);
echo PHP_EOL;
echo "$class...";
require_once $filename;
$o = new $class();
echo "Success!";
die();
}
}
echo PHP_EOL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.