LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   Install/Configuration (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=11)
-   -   listing of the files instead of opening indexfile (http://www.litespeedtech.com/support/forum/showthread.php?t=31)

_harri_ 02-26-2004 07:20 AM

listing of the files instead of opening indexfile
 
hi!

again i have a question =)
is it possible to configure lsws in a way, that the files are listed up in the webbrowser ?


*thx*
_harri_

harrinp1 02-26-2004 10:15 AM

Re: listing of the files instead of opening indexfile
 
Quote:

Originally Posted by _harri_
hi!

again i have a question =)
is it possible to configure lsws in a way, that the files are listed up in the webbrowser ?


*thx*
_harri_

You can use a simple script like this saved as index.php to do the job:-

<?
$dir_handle=opendir(".");
while ( $current_file=readdir($dir_handle) ) {
if (ereg("^\.",$current_file)) continue; # skip dot files
print "
<A HREF=$current_file>$current_file</A>";
if ( is_file($current_file) )
$files[]=$current_file;
if ( is_dir($current_file) )
$dirs[]=$current_file;
}
closedir($dir_handle);
?>

Cheers

Paul


All times are GMT -7. The time now is 05:39 PM.