我目前在浏览器中收到此错误。我不想通过 php 执行脚本,但不知怎的,我通过打印得到了这个echo shell_exec (...) 2>&1:
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
Run Code Online (Sandbox Code Playgroud)
我已经添加了 -S 并得到了这个:
[sudo] password for www-data: sudo: no password was provided
Run Code Online (Sandbox Code Playgroud)
我已经将自己添加进去了sudoers,但仍然没有解决方案。