PHP & cron: security issues

后端 未结 6 1287
孤城傲影
孤城傲影 2021-01-02 16:44

Whats the best way to ensure that only CRON executes PHP scripts, and not someone else who stumbled upon your php scripts..

I was thinking a Password Variable.... bu

6条回答
  •  自闭症患者
    2021-01-02 17:10

    You should keep this file outside of public_html

    /usr/local/bin/php -f /home/mysite/script 
    // is secure from public access
    

提交回复
热议问题