Unix-lookalike dir listing
Moderator: General Moderators
-
Shendemiar
- Forum Contributor
- Posts: 404
- Joined: Thu Jan 08, 2004 8:28 am
Unix-lookalike dir listing
On my page i need to show the contents of a directory. I currently imitate loosely the looks uf unix shell. Is there an easy way to make perfect imitation, say actually executing "ls -la" and capturing the output, or a ready class that gives accurate match. I know it isnt too complicated to do oneself, just asking if its allready done or a simple way to use the actual.
- shiznatix
- DevNet Master
- Posts: 2745
- Joined: Tue Dec 28, 2004 5:57 pm
- Location: Tallinn, Estonia
- Contact:
well you can always do exec('ls -la') but i am not sure if you can grab that output or not. take a look at the exec() function and maybe try somthing like this
Code: Select all
$list = exec('ls -la');
echo $list;Code: Select all
passthru('ls -la');