billwatson
Instructor
Hi,
My knowledge of php is minimal
I have ben using this script to return the files in a folder to a flash file and what I need now is to have the php file either return the files as xml OR to create an xml file which i can then load into flash
php file
can anyone help ?
or point me to a good tutorial
thanks
My knowledge of php is minimal
I have ben using this script to return the files in a folder to a flash file and what I need now is to have the php file either return the files as xml OR to create an xml file which i can then load into flash
php file
Code:
<?php
$maindir = $_POST["theDir"];
$mydir = opendir($maindir);
while(false !== ($file = readdir($mydir))){
if(!is_dir($file)){
$fileList[] = $file;
}
}
closedir($mydir);
natsort($fileList);
$flash = "theFiles=";
foreach($fileList as $file){
$flash .= urlencode($file)."#";
}
echo $flash;
?>
can anyone help ?
or point me to a good tutorial
thanks