0
我試圖通過cron運行php文件,但它不工作。當我在瀏覽器中輸入我的腳本的URL時,它工作。所以我認爲問題在於cron.My os是centOS。Cron centOS「無法打開輸入文件」錯誤
這是crontab。
* * * * * /usr/bin/php /var/www/htdocs/wordpress/text.php
text.php的內容是 「」
從cron電子郵件說,
X-Cron-Env: <LANG=en_US.UTF-8>
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=root>
X-Cron-Env: <USER=root>
Status: RO
Could not open input file: /var/www/htdocs/wordpress/text.php
這就是 「ls -l命令的/ var /網絡/ htdocs目錄」
-rw-r--r--. 1 root root 50 1 29 22:04 2014 index.html~
-rw-r--r--. 1 root root 22 1 29 22:04 2014 index.php
drwxr-xr-x. 13 root apache 4096 1 30 14:36 2014 phpmyadmin
drw-rw-rwx. 8 root root 4096 1 30 20:11 2014 wordpress
你能告訴我如何解決這個問題嗎?
哦,對不起,那只是typo.I've編輯。 – user3119018