crontab issue when using exec php script?
问题 I am using elementaryOS (base on ubuntu) When I run commaand line: kn3l@kn3l:/var/www/cronjob$ 25 15 * * * /var/www/cronjob/helloworld.php > /var/www/cronjob/cron.log and it works for crontab with terminal command line. BUT When I using PHP with my code like this (test.php): -rwxrwxrwx 1 kn3l kn3l 47 Jun 6 14:59 test.php* test.php <?php $output = shell_exec('crontab -l'); echo "<pre>$output</pre>"; I go to http://localhost/test.php Why I did not see any return like the command line? Anyone