$body = preg_replace("/(<a(.*))(>)(.*)(<)(\/a>)/isU", '\\1-]-\\4-[-\\6', $body); |
//设置所有关键词 $dsql12 = new DedeSql(); $query1="select * from dede_keywords"; $dsql12->SetQuery($query1); $dsql12->Execute(); while($kws = $dsql12->GetArray()) { |
if($i > $maxkey) { break; } |
$body = preg_replace("/(^|>)([^<]+)(?=<|$)/sUe", "_highlight('\\2', \$karr, \$kaarr, '\\1')", $body); |
} |