Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback

关于thinkPHP rpc调用在高版本php环境下 出现的报错问题 修改为这样既可

 //$joinStr = @preg_replace("/__([A-Z_-]+)__/esU",C("DB_PREFIX").".strtolower('$1')",$joinStr);
		$joinStr = preg_replace_callback("/__([A-Z_-]+)__/",
                    function ($matches) {  
                        return '_' . strtolower($matches[0]);  
                      },$joinStr);

相关文章:

  • 2021-11-26
  • 2021-10-26
  • 2021-08-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-03
  • 2022-12-23
  • 2022-12-23
  • 2022-03-09
  • 2021-10-23
  • 2022-12-23
相关资源
相似解决方案