Home >Backend Development >PHP Problem >How to implement shutdown method in php
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.
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.
Then you copy the code and use it directly.
The effect is as shown below. Now, you can directly use php to shut down the computer.
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!