Home  >  Article  >  php教程  >  php实现远程关机代码

php实现远程关机代码

WBOY
WBOYOriginal
2016-06-13 10:50:101128browse

1.  2. /**   
3. * 远程启动计算机   
4. * 注意:iis/apache需要有windows/system/cmd.exe执行权限   
5. * 
6. **/   
7. if (isset($_POST['cmd'])) {   
8. $cmd= stripslashes( $_POST['cmd'] );   
9. exec( $cmd,$out);   
10. var_dump($out);   
11. echo '
';   
12. var_dump($cmd);   
13. } else {   
14. ?>   
15.    
16. 

   
17. 

   
18. 

CMD

   
19.    
20.    
21. 
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:PHP操作ZipNext article:PHP生成随机数,字符串