php批量替换数组中的元素值

<?php


$files = array();
foreach (glob("/www/wwwroot/5.com/*.jpg") as $file) {
$files[] = $file;
}


$ss =str_replace('/www/wwwroot/5.com/','5.com.com/',$files);


print_r($ss);

猜你喜欢

转载自www.cnblogs.com/ysbl/p/12264462.html