Categories
How to disable script execution except for cron?
It is necessary to prohibit the execution of the script (direct transition), while having the cron run this script. Is it possible to?
Answer the question
In order to leave comments, you need to log in
if (PHP_SAPI != 'cli'){ die('Не консоль'); }
Maybe. The server runs under its www-data user, you run crons on your behalf, so you need to set the appropriate execution rights (750 if I'm not mistaken).chmod 0750 file.php
chmod 0750 file.php
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question