本文整理匯總了PHP中swoole_process::exec方法的典型用法代碼示例。如果您正苦於以下問題:PHP swoole_process::exec方法的具體用法?PHP swoole_process::exec怎麽用?PHP swoole_process::exec使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類swoole_process
的用法示例。
在下文中一共展示了swoole_process::exec方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: callback_vmstat
/**
* swoole_process回調函數
* @param swoole_process $worker
*/
function callback_vmstat(swoole_process $worker)
{
global $table;
$vmstat = $table->get('vmstat');
$cmd = $vmstat['cmd'];
$interval = $vmstat['interval'];
$count = $vmstat['count'];
$worker->exec($cmd, array($interval, $count));
}
示例2: callback_function
function callback_function(swoole_process $worker)
{
$worker->exec('/usr/local/bin/php', array(__DIR__ . '/stdin_stdout.php'));
}
示例3: run
/**
* 子進程執行的入口
* @param $worker
*/
public function run(swoole_process $worker)
{
$worker->exec($this->task['task']['parse'], $this->task['task']['ext']);
}
示例4: pyhon_process
function pyhon_process(swoole_process $worker)
{
$worker->exec('/usr/bin/python', array("echo.py"));
}
示例5: childProcess
function childProcess(\swoole_process $process)
{
$process->exec($process->args['script_file'], $process->args['argv']);
}