Php controls common functions of linux servers, such as shutdown and restarting new sites. Php contains a system method that can call system commands. First, create a script (similar to rootreboot_server.sh) and restart it. Copy the code as follows :#! Binbashrebo php contains a system method that can call system commands.
Create a script (like/root/reboot_server.sh) and restart it.
The code is as follows:
#! /Bin/bash
Reboot
Grant him another permission of 4755
Chown root: root/reboot_server.sh
Chmod 4755/root/reboot_server.sh
Chmod 4777/sbin/reboot
In php, try to call the following method:
The code is as follows:
System ("/root/reboot_server.sh ");
?>
Other functions are similar! Install a virtual machine on your own! Stop playing on the server.
There is a system method in the http://www.bkjia.com/PHPjc/325850.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/325850.htmlTechArticlephp that can call system commands. Create a script (like/root/reboot_server.sh) and restart it. The code is as follows :#! /Bin/bash rebo...