Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function listdir($dir)
- {
- if($dh = opendir($dir))
- {
- while(($file = readdir($dh)) !== false)
- {
- /* Ignore anything that starts with a period. */
- if($file[0] == '.') continue;
- if(!strcmp($file, "README.html")) continue;
- $isdir = is_dir($dir."/".$file);
- $size = ($isdir ? 0 : filesize($dir."/".$file));
- $list[] = array(
- 'name' => $file,
- 'isdir' => $isdir,
- 'size' => $size,
- 'date' => filemtime($dir."/".$file),
- 'comment' => read_comment($dir, $file)
- );
- }
- closedir($dh);
- }
- return($list);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement