Pagination类进行设置如下,防止分页错误:(return $output之前)
//分页设置suffix if($CI->config->item(‘url_suffix‘)) { $url_suffix=$CI->config->item(‘url_suffix‘); $output=str_replace($url_suffix,‘‘,$output); $output=preg_replace("/\/([0-9]+)\"/","/\\1".$url_suffix."\"",$output); } //分页设置suffix
Config.php设置如果路径结尾带?参数错误(CI框架默认site_url 函数修改)
if($suffix) { $ci_url = $this->slash_item(‘base_url‘).$this->slash_item(‘index_page‘).$this->_uri_string($uri).$suffix; $output=str_replace($suffix,‘‘,$ci_url); $output=str_replace(‘?‘,$suffix.‘?‘,$output); return $output; }else { return $this->slash_item(‘base_url‘).$this->slash_item(‘index_page‘).$this->_uri_string($uri).$suffix; }
时间: 2024-10-13 01:56:23