CodeIgniter Forums
Function not working - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: Function not working (/thread-11767.html)

Function not working - El Forum - 09-22-2008

I followed the video tutorial and set up a CI site. When I use the link to the next function, it does not run the comments function function comments()
echo 'testing...';

It runs the default function index().

I have set up route default to the blog controller.

Any help would be appreciated.


Function not working - El Forum - 09-22-2008

[eluser]David Cassidy[/eluser]
It may be of some help if you include the contents of your Controller and your routes.php file. It sounds like your route may be overriding your page requests. It is hard to tell however, with so little to go on.

Function not working - El Forum - 09-24-2008

Here is my products controller

class Products extends Controller {

function Products()



function index()

$this->load->model('categorymodel','', TRUE);


function getCategory()
echo 'category testing...';


this is what I have set up in my routes page $route['default_controller'] = "products";

When I click on a link it puts in the url http://localhost/mysite/index.php/products/getCategory which is supposed to run the getCategory() function in the products controller and echo "category testing...", it does not.
Any idea why not?

Thanks for any help.

Function not working - El Forum - 09-24-2008

I found my problem. my URI PROTOCOL
$config['uri_protocol'] = "AUTO";
Was commented out. I un-commented and it works.

Sorry if any one was thinking about this much.

And thanks Dave_C for responding.