ディレクトリ内の使用可能なすべてのサブディレクトリを取得し、そのディレクトリの名前を保存し、XML ファイルが含まれている場合はそのファイルを操作する必要があります。
ここに少しのコードと私が書いたいくつかのコメントがあります。
<?php
$path = "http://source.com/path/to/subs/";
//Check for any subdirectories
foreach($subdirectory as $sub){
$name = //subdirectory's name;
// Filepath is always http://source.com/path/to/subs/name_of_sub/description.xml
$file = $path . $name . 'description.xml';
if(file_exists($file)){
//do my stuff here
}
}
//end check
?>