dedecms文章内容页调用关键词并增加链接
{dede:field name='keywords' runphp='yes' }
if(!empty(@me))
{
$kws = explode(',',@me);
@me = "";
foreach($kws as $k)
{
@me .= "<a href='/plus/search.php?keyword=".urlencode($k)."' target=_blank ><h2>$k</h2></a> ";
}
@me= str_replace(' ', ' ',trim(@me));
}
{/dede:field}
转载于:https://blog.51cto.com/14262984/2374269