Press "Enter" to skip to content

How to shutdown computer using PHP Script?

0

PHP is a very popular language for developing a website. We can also control system by some PHP commands, In this article, I am going to show How to shutdown computer using PHP Script. We can control our system command from the web but we need to do one thing to enable Apache Configuration to use System Commands.

Windows

<?php system('shutdown -s -t 30');?> //here 30 means shutdown after 30 seconds.

We can also use the same parameter with function exec() and shell_exec() to Shutdown the Window Computers.

Linux

<?php system('shutdown -h now'); ?>

 

 

Get information about your memory and CPU usage in PHP
How to display Hindi in Website from Database(Tables)?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.