📜  带 root 的 php shell_exec - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:53.281000             🧑  作者: Mango

代码示例1
# add sudoers for www data to execute without pass
sudo vi /etc/sudoers
www-data ALL=(ALL) NOPASSWD: ALL

# execute with sudo 
shell_exec('python3 script.py')