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.



Related Posts:

Filed Under: PHP

Leave a Comment

(required)
(will not be published, required)

* Copy this password:

* Type or paste password here:






Archives

Links