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,090
    Thanks
    51
    Thanked 506 Times in 493 Posts
    The key word you should add to your google search is 'pagination'
    My helpful sig is on vacation trying to loose some weight. It got a bit fat and caused a few problems but it will be back at some point!

  • #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
    •