Results 1 to 4 of 4
  1. #1

    publish dir list to webpage

    I am new to learning about about programming languages. I have an appache linux server and have a client that wants to repetetively upload a file folder to his site with pdf files. He wants a client to just be able to view the available pdf files listed in alphabetical order and click on the ones needed. I thought my solution was to be pretty simple. I would not create an index page and have the results appear as follows:

    but there is no way for me to expand the tables and cells to accomodate for very large files names. They just get cut off.

    I would just manually create html pages with the files but we are talking about hundreds of files and this would take a lot of time.

    Is there a simple php or javascript that can publish the directory list so it is viewable on a html page?

    Any help would be appreciated


  2. #2
    Join Date
    Nov 2004
    try adding this line to your .htacess

    IndexOptions FancyIndexing NameWidth=*
    Rails in DA - Ruby on Rails plugin for Directdmin | DA-Tomcat - Tomcat Manager plugin for Directdmin
    DA-PgSQL - PostgreSQL plugin for Directdmin | IP Deny Manager - IP Deny Manager plugin for Directdmin
    DeeperAdmin - Manager your DirectAdmin server "deeper"
    Order now at

  3. #3
    alternateively, try
    IndexOptions -FancyIndexing

    then you just get a list of filenames with links and none of the other gubbins.

  4. #4
    I'm not exactly sure I understand it but maybe something like this..

    PHP Code:
    12// how long can the longest name be?
    foreach(glob("*.pdf") as $f) {
    '<li><a href="'.$f.'">';
        if (
    strlen($f) > $maxlen) echo substr($f0$maxlen).'...';
        else echo 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts