Welcome Guest, Not a member yet? Register   Sign In
Call of paginations returns 404
#1

Hello,

I am a beginner, and want to get the following tutorial running:

https://www.webslesson.info/2018/12/ajax...ation.html
Working Demo:
http://demo.webslesson.info/codeigniter-...uct_filter

When clicking on a checkbox there is a successfull post to http://demo.webslesson.info/codeigniter-...tch_data/1

I downloaded codeIgniter 3 and copied the sources of the website in the respective folders.
The db runs correctly.

When I click on a checkbox on localhost, there is a 404 response to the post http://localhost/codeigniter/product_fil...tch_data/1

I don't understand where/how ...product_filter/fetch_data/1 is created

There were some issues with:
PHP Code:
<link href "<?php echo base_url(); ?>asset/jquery-ui.css" rel "stylesheet"
They were fixed by adding the following to autoload.php
PHP Code:
$autoload['helper'] = array('url'); 

When removing 'url' from autoload.php, klicking on a checkbox does not create a post.


routes.php
PHP Code:
$route['default_controller'] = 'Product_filter';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE

config.php
PHP Code:
$config['base_url'] = 'http://localhost/codeigniter'


Can you help me understand, where/how ... /product_filter/fetch_data/1 is created?

Thanks!
Reply
#2

Hi. I don't know if I understand your question correctly.

I imagine you created the product_filter controller as mentioned in the tutorial. And put it inside the 'controllers' folder. If so, i think you should include index.php in your base_url.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB