Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

directory listing script

  • 11-02-2010 10:11pm
    #1
    Registered Users, Registered Users 2 Posts: 2,985 ✭✭✭


    Im looking for a directory listing script for a project im working on, does anyone recommend any, will look at both free and paid ones.
    Have been looking at eSyndiCat, looks good, any equivalent open source solutions?


Comments

  • Closed Accounts Posts: 1,619 ✭✭✭Bob_Harris


    I don't think eSyndiCat is a directory listing scirpt.

    This should get you started. Pass 'true' if you want it to list the contents of sub-folders too.


    [php]
    dirList('.', false);

    function dirList($path, $recursive)
    {
    $ignore = array('.', '..'); //files||dirs to ignore
    $dh = @opendir($path);
    while(($file = readdir($dh)) !== false)
    {
    if(!in_array($file, $ignore))
    {
    if(is_dir("$path/$file") && is_readable("$path/$file"))
    {
    echo "<strong>".substr("$path/$file",2)."</strong><br />";
    if($recursive)
    dirList("$path/$file");
    }
    else
    {
    echo substr("$path/$file",2). "<br />";
    }
    }
    }
    closedir($dh);
    }
    [/php]


  • Registered Users, Registered Users 2 Posts: 2,985 ✭✭✭skelliser


    sorry i meant a business directory software/script. Also to be used for listing articles or classifieds etc.
    Not for directores/folders on a pc, cheers for the reply tho


Advertisement