pagination
Posted: Wed Apr 18, 2007 2:56 am
I am using the below code to display contents of directory.
I want to make paging without the use of database, is it possible to do?
Code: Select all
$dir = "on_line_course/";
// Open a known directory, and proceed to read its contents
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
if($file !='.' && $file !='..')
{
echo "filename: $file : filetype: " . filetype($dir . $file);
echo "<br>";
}
}
closedir($dh);
}
}I want to make paging without the use of database, is it possible to do?