0
我在ci中創建了一個名爲「激勵」的模塊。我已經寫了控制器的功能,在運行PHP腳本background.but它不工作,在codeigneitor的背景下運行腳本?
這是我在控制器
function backgroundrun(){
echo "working";
$command = shell_exec("localhost/new/index.php?module=incentive&view=allIncentive&date=2016-02-29 > /dev/null & echo $!");
echo $out = exec($command);
echo "here";
}
此功能,我想運行
腳本的網址localhost/new/index.php?module=incentive&view=allIncentive&date=2016-03-29
我認爲這將有助於'echo file_get_contents(「http://localhost/new/index.php?module = incentive&view = allIncentive&date = 2016-03-29」);' – Tamil