<?php
/**
* 远程启动计算机
* 注意iis/apache需要有windows/system/cmdexe执行权限
* name:薛如飞
* qq:
* email:xuerufei@com
* blog飞云盖天
* date:
**/
if (isset($_POST[cmd])) {
$cmd= stripslashes( $_POST[cmd] );
exec( $cmd$out);
var_dump($out);
echo <br>;
var_dump($cmd);
} else {
?>
<meta httpequiv="ContentType" content="text/html; charset=gb" />
<form action="indexphp" method="post" name="form" id="form">
<p> </p>
<p align="center" >CMD</p>
<table width="" border="" align="center">
<tr>
<td width="" height="">选择:</td>
<td width=""><select name="cmd">
<option value="shutdown r" selected="selected">重启计算机</option>
<option value="shutdown s">关闭计算机</option>
<option value="shutdown l">注销当前用户</option>
</select></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Submit" value="提交" /></td>
</tr>
</table>
<p> </p>
</form>
<?php
}
?>