Why is the following not working.
$directory = './';
exec('ls -loh ' . $directory, $directory_list);
echo '<ul>';
foreach ($directory_list as $file) {
$x = explode(' ', $file);
echo '<li>' . $x[3] . '</li>';
}
echo '</ul>';
If i do not explode and i just do echo '<li>'.$file.'</li>';
then i get a string like this per li
drwxr-xr-x 10 user 4.0K Sep 8 16:06 _test
I"m trying to get only the size and not the whole string. What am i doing wrong.