时间:2021-07-01 10:21:17 帮助过:7人阅读
<?php
$paths = "C://Documents and Settings//sk//Desktop//s//";
$d = dir($paths);
while (false !== ($entry = $d->read())) {
$table_change = array(' '=>'_');
$newName = strtr($entry,$table_change);
$newName = substr($newName, 0,-4);
rename($paths.$entry, $paths.$newName."_s.jpg");
}
$d->close();
echo "done";
?> node.js文件上传重命名以及移动位置详解
以上就是PHP实现某个文件夹下所有文件重命名的方法的详细内容,更多请关注Gxl网其它相关文章!