代码preg_replace以被弃用,如何用preg_replace_callback修改如下代码!ecshop
Deprecated:preg_replace():The/emodifierisdeprecated,usepreg_replace_callbackinsteadin...
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in G:\xampp\htdocs\ECShop\includes\cls_template.php on line 494
此代码需要修改,$out = "<?php \n" . '$k = ' . preg_replace("/(\'\\$[^,]+)/e" , "stripslashes(trim('\\1','\''));", var_export($t, true)) . ";\n"; 代码preg_replace以被弃用,如何用preg_replace_callback修改此段代码? 展开
此代码需要修改,$out = "<?php \n" . '$k = ' . preg_replace("/(\'\\$[^,]+)/e" , "stripslashes(trim('\\1','\''));", var_export($t, true)) . ";\n"; 代码preg_replace以被弃用,如何用preg_replace_callback修改此段代码? 展开
展开全部
$out = "<?php \n" . '$k = ' . preg_replace_callback("/(\'\\$[^,]+)/e" , "stripslashes(trim('\\1','\''));", var_export($t, true)) . ";\n"; 直接替换就行啦
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询