PHP Classes

How do we get this class worked

Recommend this page to a friend!

      PHP Background Process  >  All threads  >  How do we get this class worked  >  (Un) Subscribe thread alerts  
Subject:How do we get this class worked
Summary:Implementation of this class
Messages:2
Author:Hamzat Luqman
Date:2017-10-27 13:07:34
 

  1. How do we get this class worked   Reply   Report abuse  
Picture of Hamzat Luqman Hamzat Luqman - 2017-10-27 13:07:34
I have downloaded this class but I don't know how to implement it and get it worked.

  2. Re: How do we get this class worked   Reply   Report abuse  
Picture of Joshy Francis Joshy Francis - 2017-10-30 06:49:16 - In reply to message 1 from Hamzat Luqman
Example, Procedural style.

$cmd='';
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {//'This is a server using Windows!';
$cmd= $php_path.'\php.exe '.$path.'\long_process.php' ;
}else{
$cmd='/usr/bin/php -f /var/www/example.com/public/long_process.php';
}
$pid=run_process($cmd);
if(is_process_running($pid)){
echo 'Process running';
stop_process($pid);
}else{
echo 'Process not running';
}