Sintaxa:
<?php
$dirpath=".";
$dh = @opendir ($dirpath);
while ($file = @readdir ($dh)) {
if(($file!="..")&&($file!=".")){
$entry = "$dirpath/$file";
$path_parts = pathinfo($entry);
$type=$path_parts["extension"];
if (is_dir($entry)) {
if ($output!="") $output .= "|";
$output.=$file;
}
}
}
echo(utf8_encode("&files=".$output));
?>
|