There is a system method in php, which can call system commands.
First create a script (eg /root/reboot_server.sh) for restarting.
Copy code The code is as follows:
#!/bin/bash
reboot
Give him permission 4755
chown root:root /root/reboot_server.sh
chmod 4755 /root/reboot_server.sh
chmod 4777 /sbin/reboot
again in php , find a way to make the following call
Copy the code The code is as follows:
system("/root /reboot_server.sh");
?>
Other functions are similar! Install a virtual machine yourself and play! Don't really hang up on the server.
http://www.bkjia.com/PHPjc/325850.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/325850.htmlTechArticleThere is a system method in php, which can call system commands. First create a script (eg /root/reboot_server.sh) for restarting. Copy the code The code is as follows: #!/bin/bash rebo...