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. #2
    Master Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    5,121
    Thanks
    110
    Thanked 602 Times in 589 Posts
    The key word you should add to your google search is 'pagination'
    Quote Originally Posted by deathshadow View Post
    So seriously, loosen up that tie, let out the belt, and try relating to normal people on the street instead of the gentleman's club crowd.

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