Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to List files from a folder with paging

    Please give me a simple tutorial listing files with limit and paging!

    <?
    $phpdir = "Files/";
    $dir = opendir ($phpdir);
    while ($file = readdir ($dir)) {
    if (( $file != ".") && ($file != "..") && ($file != ".htaccess") && ($file != "index.php") && ($file != "style.css"))
    {
    echo '<a href="'.$phpdir.$file.'">'.$file.'</a>';
    }
    }
    ?>
    How can I make paging system with this that will show 10 files per page?

  • #2
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,479
    Thanks
    63
    Thanked 538 Times in 525 Posts
    The key word you should add to your google search is 'pagination'
    I can't really think of anything to write here now...

  • #3
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Im not so smart bro!
    I got pagination script but I dont know how to use it!
    Please reply with a sample use


  •  

    Tags for this Thread

    Posting Permissions

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