我想在 php 脚本中关闭 ubuntu。
我试过这个exec("shuttown");
和 exec("sudo shuttown");
,但它没有用。
最佳答案
命令是shutdown
,它需要给定的时间:
exec("shutdown now");
另请注意,只有 root 可以运行
shutdown
.
关于php - 如何使用 exec (php) 关闭 ubuntu,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5214573/