Note that there are some explanatory texts on larger screens.

plurals
  1. POPagination, next page doesn`t display
    primarykey
    data
    text
    <p><strong>SOLVED!</strong></p> <p>if I click page 2 that`s error:</p> <blockquote> <p>Not Found The requested URL /rank/GetAll/30 was not found on this server.</p> </blockquote> <p>My link is:</p> <pre><code>http://localhost/rank/GetAll/30 </code></pre> <p>Model: Rank_Model</p> <pre><code>&lt;?php Class Rank_Model extends CI_Model { public function __construct() { parent::__construct(); } public function record_count() { return $this-&gt;db-&gt;count_all("ranking"); } public function fifa_rank($limit, $start) { $this-&gt;db-&gt;limit($limit, $start); $query = $this-&gt;db-&gt;get("ranking"); if ($query-&gt;num_rows() &gt; 0) { foreach ($query-&gt;result() as $row) { $data[] = $row; } return $data; } return false; } } ?&gt; </code></pre> <p>Controller: Rank</p> <pre><code>&lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class rank extends CI_Controller { function __construct() { parent::__construct(); $this-&gt;load-&gt;helper("url"); $this-&gt;load-&gt;helper(array('form', 'url')); $this-&gt;load-&gt;model('Rank_Model','',TRUE); $this-&gt;load-&gt;library("pagination"); } function GetAll() { $config = array(); $config["base_url"] = base_url() . "rank/GetAll"; $config["total_rows"] = $this-&gt;Rank_Model-&gt;record_count(); $config["per_page"] = 30; $config["uri_segment"] = 3; $this-&gt;pagination-&gt;initialize($config); $page = ($this-&gt;uri-&gt;segment(3)) ? $this-&gt;uri-&gt;segment(3) : 0; $data["results"] = $this-&gt;Rank_Model-&gt;fifa_rank($config["per_page"], $page); $data['errors_login'] = array(); $data["links"] = $this-&gt;pagination-&gt;create_links(); $this-&gt;load-&gt;view('left_column/open_fifa_rank',$data); } } </code></pre> <p>View Open: open_fifa_rank</p> <pre><code>&lt;?php $this-&gt;load-&gt;view('mains/header'); $this-&gt;load-&gt;view('login/loggin'); $this-&gt;load-&gt;view('mains/menu'); $this-&gt;load-&gt;view('left_column/left_column_before'); $this-&gt;load-&gt;view('left_column/menu_left'); $this-&gt;load-&gt;view('left_column/left_column'); $this-&gt;load-&gt;view('center/center_column_before'); $this-&gt;load-&gt;view('left_column/fifa_rank'); $this-&gt;load-&gt;view('center/center_column'); $this-&gt;load-&gt;view('right_column/right_column_before'); $this-&gt;load-&gt;view('login/zaloguj'); $this-&gt;load-&gt;view('right_column/right_column'); $this-&gt;load-&gt;view('mains/footer'); ?&gt; </code></pre> <p>and View: fifa_rank</p> <pre><code>&lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;td&gt;Pozycja&lt;/td&gt; &lt;td&gt;Kraj&lt;/td&gt; &lt;td&gt;Punkty&lt;/td&gt; &lt;td&gt;Zmiana&lt;/td&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;?php foreach($results as $data) {?&amp;gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;?php print $data-&gt;pozycja;?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php print $data-&gt;kraj;?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php print $data-&gt;punkty;?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php print $data-&gt;zmiana;?&gt;&lt;/td&gt; &lt;/tr&gt; &lt;?php } ?&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;&lt;?php echo $links; ?&gt;&lt;/p&gt; </code></pre> <p>Maybe you know where is my problem?</p> <p>Now I know where is my problem. In first page I have link:</p> <pre><code>http://localhost/index.php/rank/GetAll </code></pre> <p>But on the next:</p> <pre><code>http://localhost/rank/GetAll/30 </code></pre> <p>In secend link, I don`t have index.php. How can I fix it?</p> <p>In $config["base_url"] = base_url() . "rank/GetAll"; I add : $config["base_url"] = base_url() . "index.php/rank/GetAll";</p> <p>And it`s ok :)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload