how to execute terminal commands in php ?

      shell_execExecute command via shell and return the complete output as a string.

 syntax:
string shell_exec ( string $cmd ) ;

 $cmd (string ) will be exicuted in terminal.


EX:  
 
<?php
$output 
shell_exec('ls -lart');
echo 
"<pre>$output</pre>";?>
 
 

Thank U 

Comments