LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > listing of the files instead of opening indexfile

Reply
 
Thread Tools Display Modes
  #1  
Old 02-26-2004, 07:20 AM
_harri_ _harri_ is offline
Member
 
Join Date: Feb 2004
Posts: 11
Default 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_
Reply With Quote
  #2  
Old 02-26-2004, 10:15 AM
harrinp1 harrinp1 is offline
Member
 
Join Date: Jul 2003
Location: Chester, UK
Posts: 12
Default 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
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
lsz files jrmarino General 1 07-24-2007 11:00 AM
Forbid access to PHP files BobbyEasland Install/Configuration 3 05-08-2007 08:53 AM
Blocking files by extension Marcus Install/Configuration 2 02-28-2007 03:09 PM
Deletion of /tmp/lshhtpd swap & other lsws files athanasius Install/Configuration 1 02-23-2006 05:25 PM
gzip for static files with no write permissions IO Bug Reports 2 09-24-2005 08:26 AM


All times are GMT -7. The time now is 03:53 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.