代码如下:
<?php function foreachDir($path){ $handle=opendir($path); if($handle){ while (false !== ($file = readdir($handle))) { if($file!="." && $file!='..'){ if(is_dir($path.$file)){ echo $path.$file."<br/>"; foreachDir($path.$file); }else{ echo "--".$path."//m.sbmmt.com/m/".$file."<br/>"; $ext = strripos($file,'.'); $aaa = substr($file,0,$ext); rename($path.'//m.sbmmt.com/m/'.$file,$path.'//m.sbmmt.com/m/'.$aaa.'.JPG'); // die(); } } } return false; } } foreachDir('D:\xampp\htdocs\TNF2');
已抢65043个
抢已抢28149个
抢已抢15136个
抢已抢7615个
抢已抢9495个
抢已抢19265个
抢