Ubuntu-Cron作业未在包含包含文件的PHP脚本中完成

时间:2019-03-17 15:00:55

标签: php cron ubuntu-14.04

每次cron作业运行我的脚本并且有效时,我都会在数据库中插入一条记录。当PHP脚本到达包含文件时,该文件中的功能将不会执行。当我在浏览器中运行脚本时,一切正常。访问包含文件是否存在cron权限问题?我的Ubuntu cron日志中没有看到错误。

1 个答案:

答案 0 :(得分:0)

It turns out paths to includes in the PHP file need to be absolute. Adding "/var/www/html/filename.php" worked for me.