复制代码 代码如下: function showtext($text){ $search = array('|(http://[^ ]+)|', '|(https://[^ ]+)|', '|(www.[^ ]+)|'); $replace = array('$1', '$1', '$1'); $text = preg_replace($search, $replace, $text); return $text; } http://www.bkjia.com/PHPjc/324307.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/324307.htmlTechArticle复制代码 代码如下: function showtext($text){ $search = array('|(http://[^ ]+)|', '|(https://[^ ]+)|', '|(www.[^ ]+)|'); $replace = array('a href="$1" target="_blank"$1/a',...