...

View Full Version : How to List files from a folder with paging



soroze
01-06-2012, 01:34 AM
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?

tangoforce
01-06-2012, 01:47 AM
The key word you should add to your google search is 'pagination' :)

soroze
01-06-2012, 10:09 AM
Im not so smart bro!
I got pagination script but I dont know how to use it!
Please reply with a sample use



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum