For Programmers: Free Programming Magazines  


Home > Archive > PHP SQL > February 2006 > Re: Help - make PHP pull a File List (dir/ls/etc) in a specific directory - print res









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Help - make PHP pull a File List (dir/ls/etc) in a specific directory - print res
samudasu

2006-02-26, 3:56 am

If you just want a quick dirty listing and your server allows you to
use program execution functions, i.e. you're not restricted by openbase
dir, safe mode, etc. Otherwise i'd suggest using php's directory
functions as mentioned before.

$result = shell_exec('ls /usr/bin');
print "<pre>$result</pre>";

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com