Welcome Guest, Not a member yet? Register   Sign In
link address for next page in Pagination
#1

Hello, 

CI Pagination works good except one thing below.

The pagination link of the newer(or older) is not what I expected.
CI shows 'localhost/ci4/notice?page=2' instead of 'localhost/notice?page=2'. 
If I type the expected address into a Chrome manually, the page shows perfectly.

ci4 is project folder which I made via composer and has app, public, tests, vender, writable folders and dotenv file. 
How can I omit /ci4/ in a link?

*app\Config\App.php
public string $baseURL = 'http://localhost/ci4/';

*.env
app_baseURL = 'http://localhost/ci4/'

*Views\notice\index.php
<?php echo $pager->links() ?>
<?php echo $pager->simpleLinks() ?>
Reply
#2

If 'localhost/notice?page=2' is correct, your baseURL should be:
Code:
app_baseURL = 'http://localhost/'
Reply
#3

(02-10-2024, 11:05 PM)kenjis Wrote: If 'localhost/notice?page=2' is correct, your baseURL should be:
Code:
app_baseURL = 'http://localhost/'

Thanks! solved. 
You are the best.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB