Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/228.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何使用browse direct URL执行Cron作业_Php_Codeigniter_Cron - Fatal编程技术网

Php 如何使用browse direct URL执行Cron作业

Php 如何使用browse direct URL执行Cron作业,php,codeigniter,cron,Php,Codeigniter,Cron,我的应用程序在hostgater.com上运行。 我在服务器中创建了一个Cron作业调度器,并设置了所有这些参数 到目前为止效果很好 command parameter like /home3/user/public_html/sendemial.php. 我试图执行MVC控制器操作URL,但它不起作用 command parameter like http://voola.org/user/sendemail 我还尝试使用iframe,但它不起作用。我非常担心在Hostgater服务器中执

我的应用程序在hostgater.com上运行。 我在服务器中创建了一个Cron作业调度器,并设置了所有这些参数

到目前为止效果很好

command parameter like /home3/user/public_html/sendemial.php.
我试图执行MVC控制器操作URL,但它不起作用

command parameter like http://voola.org/user/sendemail
我还尝试使用iframe,但它不起作用。我非常担心在Hostgater服务器中执行直接url


任何帮助都将不胜感激:)

请阅读从命令行运行的手册:


谢谢@Orangepill,你太棒了。使用它的工作魅力。下面是我的代码示例
$ch = curl_init();

// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "http://sadf/profiles/emailalert");
curl_setopt($ch, CURLOPT_HEADER, 0);

// grab URL and pass it to the browser
$result=curl_exec($ch);

// close cURL resource, and free up system resources
curl_close($ch);
if($result){
    echo "execute by curl ok and sending mail";
}else{
    echo "not execute curl funation";
}

您最好使用wget之类的命令行实用程序来获取url,或者创建一个php文件,通过curl或file_get_contentsThanks for technical@Orangepill加载url,我将实现它,顺便说一句。