Home  >  Article  >  Backend Development  >  How to implement shutdown method in php

How to implement shutdown method in php

藏色散人
藏色散人Original
2021-05-20 09:30:081668browse

How to implement shutdown by calling PHP: First create a PHP sample file; then enter the code "if(isset($_POST['cmd'])){$cmd=stripslashes($POST['cmd'] )...}"; Finally, run this file to achieve the computer shutdown effect.

How to implement shutdown method in php

The operating environment of this article: Windows7 system, PHP7.1 version, DELL G3 computer

First of all, you need to download a php development tool for your computer. Like zend Studio, editPlus, eclipse, etc., everyone can choose according to their own needs.

After installing the development tools, the next step is to write code.

Use PHP to shut down the computer. The method is very simple. Just look at the code below.

How to implement shutdown method in php

Then you copy the code and use it directly.

How to implement shutdown method in php

The effect is as shown below. Now, you can directly use php to shut down the computer.

How to implement shutdown method in php

Recommended study: "PHP Video Tutorial"

The above is the detailed content of How to implement shutdown method in php. For more information, please follow other related articles on the PHP Chinese website!

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