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?
<?
$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?