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
猜你喜欢
  • 2022-12-23
  • 2021-08-24
  • 2022-12-23
  • 2021-08-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案