2
在我的應用程序中,我需要爲每日更新設置cron作業。我使用笨3.0cron作業返回登錄頁面codeigniter中的html
我的config.php文件
$config['index_page'] = '';
$config['uri_protocol'] = 'AUTO';
這裏是我的控制器
class Cron extends CI_Controller {
public function cron_job(){
if (!$this->input->is_cli_request()){
echo 'test';
//show_error('Direct access is not allowed');
}
else{
echo 'call';
}
}
}
,我已經在cpenal設置路徑像
/usr/bin/php /home/public_html/my_app/index.php cron cron_job
但這回也是應用程序首頁的登錄頁面的html。 我認爲路徑存在問題,那麼我該如何解決它?
非常感謝。 -cli工作。 –