You could use exec() function like this:
$arr = array();
exec('ls -la', $arr);
print_r($arr);
The specified array will be filled with every line of output from the command, like this:
Array
(
[0] => totalt 288
[1] => drwxr-xr-x 3 xxx users 4096 21 jun 2002 .
[2] => drwxr-xr-x 9 xxx users 4096 21 jun 00.01 ..
[3] => drwxr-xr-x 2 xxx users 4096 11 jun 10.27 CVS
[4] => -rw-r--r-- 1 xxx users 206 5 feb 14.46 GUI404.class.inc.php
)