<?php //自动标签内链 function nltag($content ,$domain) { global $CACHE; $tag_cache = $CACHE->readCache('tags'); foreach($tag_cache as $value){ $tag_url = Url::tag($value['tagurl']); $keyword = $value['tagname']; $cleankeyword = stripslashes($keyword); $url = "<a href=\"{$tag_url}\" title=\"浏览关于“{$cleankeyword}”的文章\" target=\"_blank\" >{$cleankeyword}</a>"; $regEx = '\'(?!((<.*?)|(<a.*?)))('. $cleankeyword . ')(?!(([^<>]*?)>)|([^>]*?</a>))\'s'; $content = preg_replace($regEx,$url,$content); } return $content; } ?>
<?php echo $log_content; ?>
<?php echo nltag($log_content,$domain);?>
站点统计
留言咨询