i have two fils named `index.php` and cron.php. i have written some logic of sending mail in cron.php. when i call index.php then i want that cron.php should run in bacground. how can i do that
This is my `index.php`
and this is my test.php
This is my `index.php`
Code:
$x=array('to'=>'ucerturohit@gmail.com','name'=>'Rohitashv singhal');
$client = new \Predis\Client();
$client->select(4);
$client->lpush('xxxx',$x['to']);
// $command = "/usr/bin/php5 -f /var/www/Symfony/src/Ens/NewBundle/Controller/test.php";
$arrOutput=shell_exec('php test.php');
print_r($arrOutput);
// echo shell_exec('php test.php');
return $this->render('EnsNewBundle:Email:header.html.twig');
}
Code:
require '/var/www/predis/autoload.php';
\Predis\Autoloader::register();
echo "hi";
require_once('Services/Notification.php');
$client = new \Predis\Client();
$client->select(4);
$u=$client->blpop('xxxx',0);
var_dump($u);
notification_on_signup($u[1]);
Comment