Dedecms分頁符導致網(wǎng)頁錯位的解決方法故障問題
導讀:故障問題故障問題解決方法: 打開 /include/arc.archives.class.php 找到 ://處理要分頁顯示的字段 在 if($this-SplitPageFiseo網(wǎng)站優(yōu)化seo網(wǎng)站優(yōu)化培訓。
解決方法: 打開 /include/arc.archives.class.php 找到 ://處理要分頁顯示的字段 在 if($this-SplitPageField!= $GLOBALS[cfg_arcsptitle]=Y isset($this-Fields[$this-SplitPageField])) { 下面添加如下代碼 $yu_array = ; $yu_tmp = ; $yu_body = $this-Fields[$this-SplitPageField]; preg_match_all( […]
解決方法:
打開 /include/arc.archives.class.php網(wǎng)站seo優(yōu)化診斷工具 找到 ://處理要分頁顯示的字段 在
if($this->SplitPageField!='' && $GLOBALS['cfg_arcsptitle']='Y' && isset($this->Fields[$this->SplitPageField])) {
下面添加如下代碼
$yu_array = ''; $yu_tmp = ''; $yu_body = $this->Fields[$this->SplitPageField]; preg_match_all("|<p[^>]*>([^<]*)</p>|isU",$yu_body,$yu_array); for($i=0;$i<count($yu_array[0]);$i++){ if((stristr($yu_array[1][$i],'@p@') !== false) && (stristr($yu_array[1][$i],'@e@') !== false)){ preg_match('|(@p@.*?@e@)|si',$yu_array[1][$i],$yu_tmp); $yu_body = str_repla個業(yè)網(wǎng)站建設(shè)公司ce($yu_array[0][$i],$yu_tmp[1],$yu_body); } } $this->Fields[$this->SplitPageField] = $yu_body;
//將上面代碼中的@替換為#號。
保存即可。&網(wǎng)站優(yōu)化seo培訓nbsp; 其作用是在模板解析分頁的時候把分頁標簽兩邊的<p>過濾掉,這樣這個標簽就不會出現(xiàn)在文章內(nèi)容頁中。<div> 的用法類似,把正則里的 <p> 改成 <div> 即可。
相關(guān)seo網(wǎng)站優(yōu)化seo網(wǎng)站優(yōu)化培訓。聲明: 本文由我的SEOUC技術(shù)文章主頁發(fā)布于:2023-05-25 ,文章Dedecms分頁符導致網(wǎng)頁錯位的解決方法故障問題主要講述分頁,解決方法,網(wǎng)頁網(wǎng)站建設(shè)源碼以及服務(wù)器配置搭建相關(guān)技術(shù)文章。轉(zhuǎn)載請保留鏈接: http://www.bifwcx.com/article/web_8728.html