PHP cPanel 中的 Cron Job 不工作
PHP Cron Job from cPanel not working
我正在使用 Codeigniter 3 并使用 cPanel 运行 一个 Cron 作业。
我输入了这样的命令:
php /home/name/public_html/ convert
为我的控制器加载页面时,我不需要包含 index.php
因此我没有将其包含在上面的路径中。 convert
是我的控制器的名称。
我在使用上述命令时收到 404 Not Found
。如果我将其更改为:
php /home/name/public_html/index.php convert
我收到此错误:
<h4>A PHP Error was encountered</h4>
<p>Severity: Notice</p>
<p>Message: Undefined index: REQUEST_METHOD</p>
<p>Filename: core/Security.php</p>
<p>Line Number: 208</p>
我不确定我做错了什么。有没有人发现我在做什么有什么问题?
我不得不求助于 运行
curl http://example.com/controller/function
我正在使用 Codeigniter 3 并使用 cPanel 运行 一个 Cron 作业。
我输入了这样的命令:
php /home/name/public_html/ convert
为我的控制器加载页面时,我不需要包含 index.php
因此我没有将其包含在上面的路径中。 convert
是我的控制器的名称。
我在使用上述命令时收到 404 Not Found
。如果我将其更改为:
php /home/name/public_html/index.php convert
我收到此错误:
<h4>A PHP Error was encountered</h4>
<p>Severity: Notice</p>
<p>Message: Undefined index: REQUEST_METHOD</p>
<p>Filename: core/Security.php</p>
<p>Line Number: 208</p>
我不确定我做错了什么。有没有人发现我在做什么有什么问题?
我不得不求助于 运行
curl http://example.com/controller/function