- 306 名前:nobodyさん mailto:sage [2008/07/03(木) 15:30:45 ID:???]
- $dirurl[] = '../test1/';
$dirurl[] = '../test2/'; foreach($dirurl as $key =>$value){ $dir = @opendir($value); while($file = @readdir($dir)) { if (!is_dir($file)){ @include_once($value.$file); if($sitemap_ok != '1') continue; $pegedata = explode("." , $value.$file); $lastupdate = @date("Y-m-d\TH:i:s\+09:00",@filemtime($value.$file)); $sitemaps = <<<_EOD_ <url> <loc>$SERVER_NAME$pegedata[2].html</loc> <priority>$priority</priority> <changefreq>$changefreq</changefreq> <lastmod>$lastupdate</lastmod> </url> _EOD_; echo $sitemaps;}} closedir($dir);} 今こんな感じです。それぞれ必要な内容は取り出せているのですが、これを更新日時順で並ばせたいと思っています。 arsort($xxx,SORT_NUMERIC);などで更新日時順で並べれる事は分かるのですが、どこをどうすればいいのやら… もう1ど最初から作り直した方がいいでのでしょうか。
|

|