I have a php code that is supposed to run a command(python code) in linux (specifically ubuntu) The python code I have is the following:
import os
os.system("poweroff")
but.. when I run the php code that contains
shell_exec("python3 /var/www/html/main.py);
It doesn't works. My device doesn't shuts down.
Please can anybody help?
I have already tried running
exec("python3 /var/www/html/main.py);
but that didn't worked as well....