Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
phpにnginxをリロードするためのアクセス権を与える必要があります。コマンドはnginx -s reloadそうです。以下のsudoersファイルのエントリは正しいですか?
nginx -s reload
www-data ALL=NOPASSWD: nginx -s reload
それでは、<?php exec('sudo nginx -s reload'); ?>またはshell_execが使用する関数になりますか?
<?php exec('sudo nginx -s reload'); ?>
ありがとう
nginx への絶対パスを使用しますが、構文は正しいようです。あなたが使うだろうshell_exec()
shell_exec()