CodeIgniter Forums

Full Version: Can't use underscores in controllers?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

I was writing a controller and put an underscore and it wouldn't take it.

I named my file /controller/forgot_password.php

the url /index.php/forgot_password.php would not go to it

renaming to /controller/forgotpassword.php

and using the url


worked. Am I doing something wrong or is this a bug?

I'm using CodeIgniter 1.7.2

El Forum

You are doing something wrong. You can use underscore with your controller. I see that you tried url:

You are using .php extension in the url and thats not usually used(unless you have set the extension to be .php in the config).

That would explain why url /index.php/forgotpassword would work with changed controllername and because it didnt have .php extension.