anyone know of a tutorial or a way to create a directory listing using PHP or ASP and displaying it using flash?
cheers
anyone know of a tutorial or a way to create a directory listing using PHP or ASP and displaying it using flash?
cheers
Hey, um can you trim all but the actual directory part, so that it can echo the exact listing? e.g.
watever.txt
watever.mp3
watever.zip
?
<?
class myDir {
var $dname, $file, $handle;
function myDir(){
$this -> dar = array();
}
function getdir(){
$handle = opendir($this -> dname);
while(false!==($file = readdir($handle))){
if(substr($file, 0, 1) != "."){
if(is_dir($this-> dname . "/" . $file)){
$new_dir = $this -> dname . "/" . $file;
$dir = new myDir;
$dir -> dname = $new_dir;
$dir -> getdir();
//echo "<h1>$new_dir</h1><br />";
}
else
{
array_push($this -> dar, $this -> dname . "/" . $file);
}
}
}
closedir($handle);
sort($this -> dar);
for($x=0; $x < count($this -> dar); $x++){
echo $this -> dar[$x] . "<br />";
}
}
}
$my_dir = new myDir;
$my_dir -> dname = ".";
$my_dir -> getdir();
?>
it outputs like this:
:: Copyright KIRUPA 2024 //--