编写给定文件夹路径 自动生成XML文件工具
编写给一个文件路径,然后读取路径下文件夹和文件名,自动生成XML文件,请问有大神编写过没有 ,求指导
------解决思路----------------------
基础代码
foreach(glob('images/*.*') as $fn) {<br /> $r[] = (object)array('filename' => $fn, 'type' => 'folder', 'folder' => 'site');<br />}<br />print_r($r);
Array<br />(<br /> [0] => stdClass Object<br /> (<br /> [filename] => images/000.bmp<br /> [type] => folder<br /> [folder] => site<br /> )<br /><br /> [1] => stdClass Object<br /> (<br /> [filename] => images/0001.bmp<br /> [type] => folder<br /> [folder] => site<br /> )<br /><br /> [2] => stdClass Object<br /> (<br />