关于使用DEDECMS程序的站长,请参照脚本之家以前发表过的DEDECMS点击图片进入下一页教程,那么PHPCMS能否实现呢,回答是可以的,今天脚本之家将实现方法告诉大家。 {php $i=strrpos($pages,"href=");} {php $str = substr($pages,$i+5,-10);} {php $content = str_replace("<img","<strong><font color=#ff0033>点击图片 进入下一页</font></strong><a href=".$str."<img",$content);} {php echo str_replace("/>","/></a>",$content);} 重新生成,好了,一切OK! {if $pages} <?php $i=strrpos($pages,"href="); $str = substr($pages,$i+5,-10); $m=strpos($pages,$str); if ($m==$i+5){ $content = preg_replace('/(<img (.+)>)/Ui',"<a href=\"".$CATEGORY[$catid][url]."\">\${1}</a>",$content,-1); } else{ $content = preg_replace('/(<img (.+)>)/Ui',"<a href=".$str."\${1}</a>",$content,-1); } ?> {/if} {$content} |