[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
PHPDirectoryIndex
Description:
function that reads directory content and returns the result as links to every file in the directory. toss it into any directory as index.php and get a list of links to every file
Code:
<? function directory($result) { $handle=opendir("."); while ($file = readdir($handle)) { if ($file == "." || $file == "..") { } else { print "<a href=$file>$file</a><br>\n"; } } closedir($handle);
return $result; }
?> <b>Select the file you want to go to:</b> <p> <? echo directory($result); ?>
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
PHPDirectoryIndex
Description:
function that reads directory content and returns the result as links to every file in the directory. toss it into any directory as index.php and get a list of links to every file
Code:
<? function directory($result) { $handle=opendir("."); while ($file = readdir($handle)) { if ($file == "." || $file == "..") { } else { print "<a href=$file>$file</a><br>\n"; } } closedir($handle);
return $result; }
?> <b>Select the file you want to go to:</b> <p> <? echo directory($result); ?>
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
