How to suspend/restart Linux Ubuntu from PHP script? -


i have problem. want restart ubuntu php code can not. have tried of codes internet

<?php shell_exec("/usr/sbin/reboot"); exec("/usr/sbin/reboot"); system("/usr/sbin/reboot"); ?> 

and

<?php shell_exec("shutdown -r"); exec("shutdown -r"); system("shutdown -r"); ?> 

but of them nothing. please me. need code.

i don't recommend giving root access php user

check here: https://stackoverflow.com/a/5226760/2708670


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -