Следующий код отобразит весь файл в каталоге
<?php
if ($handle = opendir('.')) {
while (false !== ($file = readdir($handle)))
{
if (($file != ".")
&& ($file != ".."))
{
$thelist .= '<LI><a href="'.$file.'">'.$file.'</a>';
}
}
closedir($handle);
}
?>
<P>List of files:</p>
<UL>
<P><?=$thelist?></p>
</UL>
Пока это очень простой код, он выполняет задание.
Теперь я ищу способ опубликовать ТОЛЬКО файлы, в которых есть .xml(или .XML) в конце, как это сделать?