热搜:NVER 

PHP远道重启服务器代码

2024-04-29 09:33:01
 PHP远道重启服务器代码

PHP远程重启服务器代码

<?php if(isset($_GET['action']))

{

$action = $_GET['action'];

$cmd = ”;

switch($action)

{

case ‘shutdown’:

$cmd = ‘shutdown -s’;

break;

case ‘abort-shutdown’:

$cmd = ‘shutdown -a’;

break;

case ‘reboot’:

$cmd = ‘shutdown -r’;

break;

default:

// do nothing

break;

}

if($cmd != ”)

{

system($cmd);

}

}

?>-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>





Manage Your Cumputer

Shutdown

Abort shutdown

Reboot

?