PHP 例子1: 把'\'变成'\\' $str = preg_replace("/\\\\/","\\\\\\",$str); 例子2: 把'/'变成'//' $str= preg_replace("/\//","//",$str); 相关文章: 2021-04-28 2022-12-23 2023-03-19 2022-12-23 2022-12-23 2021-06-09 2021-06-04