passthru() function works like exec(), except that the command output is automatically output. : passthru « Utility Function « PHP






passthru() function works like exec(), except that the command output is automatically output.

 
Its syntax is: void passthru (string command [, int return_variable])

If return_variable is provided, it will be assigned the command return status.

use passthru() to view the uptime of the server

<?
  passthru("uptime");
?>
  
  








Related examples in the same category

1.Using passthru() to Output Binary Data
2.Using the PHP passthru() Function
3.void passthru ( string command [, int &return_var] ) runs an external program