Home > PHP > Execute Commands in PHP

Execute Commands in PHP

June 24, 2005 Posted by KP

Sometimes I login to the server only for running a simple command, such as uptime. It can be more convenient to do this with a simple PHP page, for example, the following code will display the the output of uptime command:

<?php passthru("uptime"); ?>

For more details about how to execute Unix/Linux command in PHP, please refer to PHP online manual.

Bookmark and Share


Related Posts:

Filed Under: PHP

Leave a Comment









*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word




Categories

Archives

Meta