我发现了很多关于此的问题和文章,但我仍然遇到一些困难.我正在使用以下命令/usr/bin/php home/domain.com/public_html/cron/script.php我收到以下错误状态:404 未找到X-Powered-By:PHP/5.2.8内容类型:text/html
I have found many questions and articles about this but i still have some difficulties. I'm using the following command /usr/bin/php home/domain.com/public_html/cron/script.php I receive the following error Status: 404 Not Found X-Powered-By: PHP/5.2.8 Content-type: text/html
未指定输入文件.
我正在使用 Cpanel,该文件托管在 domain.com/cron/script.php任何想法,谢谢:p
i'm using Cpanel, the file is hosted on domain.com/cron/script.php Anyideas, thanks :p
尝试:
wget -O - http://domain.com/cron/script.php
看看你是否得到更好的结果.
and see if you get a better result.
添加了- O - "以不将输出写入主文件夹.
added "- O - " to not write output to home folder.
这篇关于如何在 cron 中运行 php 脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!