$options = Typecho_Widget::widget('Widget_Options');
$sUrl = str_ireplace('/', '\/', rtrim($options->siteUrl, '/'));
$preg = '#()#ise';
$text = preg_replace($preg, "stripslashes('$1') . '$options->siteUrl' . 'go.html?url=' . base64_encode('$2') . '\" target=\"_blank\"' . stripslashes('$3')", $text);
代码放到PHP7.0后报错了,根据提示得知是preg_replace被废弃了,得用preg_replace_callback代替。请问怎么做?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
不是preg_replace被废弃,是/e这个修饰符被废弃。

我想大概应该这样改
哪里看出放弃了这个函数了 ?
http://php.net/manual/zh/func...
支持 (PHP 4, PHP 5, PHP 7)
贴报错提示吧
preg前缀的都没废弃,废弃的是eregi前缀的函数