【发布时间】:2015-08-20 16:46:08
【问题描述】:
<?php
mail('myemail@example.com', 'Test email', 'Test cron running');
?>
test_email.php 有上面的代码,当我手动运行这个文件(通过 URL)然后我收到了电子邮件但通过 cron 作业我没有收到电子邮件。
* * * * * /usr/bin/php /home/test/public_html/bs/cron/test_email.php >> /home/test/public_html/test_email.log &
* * * * * curl --silent -o /dev/null http://www.example.com/cron/test_email.php
我使用了两个 cron 命令但没有结果。 谁能指导我代码中的问题在哪里?
【问题讨论】: