Execute PHP via cron - No Input file specified

后端 未结 6 1153
醉梦人生
醉梦人生 2021-01-14 02:13

I\'m using the following command to execute a PHP file via cron

php -q /home/seilings/public_html/dvd/cron/mailer.php

The problem is that I

6条回答
  •  生来不讨喜
    2021-01-14 02:53

    Another simple solution:

    cron:

    php -q /home/seilings/public_html/dvd/cron/mailer.php local
    

    php:

    if (!empty($argv[0])) {
        $config["mode"] = "local";
    } else {
        $config["mode"] = "live";
    }
    

提交回复
热议问题