Codeigniter分页不起作用

问题描述:

I am trying to do pagination in codeigniter. Pagination is coming in the view page, but when I try to click on next link I am getting this error:

The URI you submitted has disallowed characters.

and this is my url while click on next button

http://localhost/indianeers/pages/load_country/&per_page=2.

Please help me to do this pagination. I have been struggling for 3 days.

I have seen this in config.php

$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';

Should i change this code?

我正在尝试在codeigniter中进行分页。 分页即将出现在视图页面中,但当我尝试单击下一个链接时,我收到此错误: p>

 您提交的URI不允许使用字符。
  code  >  pre> 
 
 

这是我的网址,点击下一步按钮 p>

  http:// localhost / indianeers / pages / load_country /& amp;  per_page = 2。
  code>  pre> 
 
 

请帮我分页。 我已经苦苦挣扎了3天。 p>

我在config.php中看到了这一点 p>

  $ config ['allowed_uri_chars'] ='  az 0-9~%。:_ \  - '; 
  code>  pre> 
 
 

我应该更改此代码吗? p> div>

In your code you pass & with URI and that is not included in the config page.

replace ur code with below code in config

$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-&';

permitted_uri_chars are the characters that CodeIgniter accepts in your URI.The default value is set to something like.

$config['permitted_uri_chars'] = 'a-z 0-9~%.:&_\-'; 

By default only these are allowed: a-z 0-9~%.:_-

Leave blank to allow all characters -- but only if you are insane.

Try this- Add %3D to $config['permitted_uri_chars']