PHP截取字符串最后一位进行替换
$image_path = 'http://www.baidu.com/1'; $str = preg_replace('#.$#i', '0', $image_path);第二个参数要替换的内容 ...
$image_path = 'http://www.baidu.com/1'; $str = preg_replace('#.$#i', '0', $image_path);第二个参数要替换的内容 ...