Hi, I have no cue on php and its usage.. i am stuck.. I just wanted to list all the files and dir of the folder on webpage and unfortunately the web-server is set up for php..
http://www.php.net/manual/en/function.scandir.php#109115 <code> <?php //-- Directory Navigation with SCANDIR //-- //-- optional placemenet $exclude_list = array(".", "..", "example.txt"); if (isset($_GET["dir"])) { $dir_path = $_SERVER["DOCUMENT_ROOT"]."/".$_GET["dir"]; } else { $dir_path = $_SERVER["DOCUMENT_ROOT"]."/"; } //-- until here function dir_nav() { global $exclude_list, $dir_path; $directories = array_diff(scandir($dir_path), $exclude_list); echo "<ul style='list-style:none;padding:0'>"; foreach($directories as $entry) { if(is_dir($dir_path.$entry)) { echo "<li style='margin-left:1em;'>[`] <a href='?dir=".$_GET["dir"].$entry."/"."'>".$entry."</a></li>"; } } echo "</ul>"; //-- separator echo "<ul style='list-style:none;padding:0'>"; foreach($directories as $entry) { if(is_file($dir_path.$entry)) { echo "<li style='margin-left:1em;'>[ ] <a href='?file=".$_GET["dir"].$entry."'>".$entry."</a></li>"; } } echo "</ul>"; } dir_nav(); //-- optional placement if (isset($_GET["file"])) { echo "<div style='margin:1em;border:1px solid Silver;'>"; highlight_file($dir_path.$_GET['file']); echo "</div>"; } //-- until here //-- //-- Because I love php.net ?> </code> can i get someone to show me some direction.. Srikanth Kamath _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers