Welcome Guest, Not a member yet? Register   Sign In
Controller File Name?
#1

I'm just starting CI on Linux and I notice that I cannot get a Controller to work properly unless the Controller file name begins with a capital letter.  IOW, a controller named "Home" will not work unless the controller's file name is "Home.php".

I've tried different combinations of "Home" and "home" for the Controller name and different combinations of "Home.php" and "home.php" for the Controller's file name.  The only file name that works is "Home.php.

I'm just trying to see if there is way to keep all file names lowercase - which is a convention I've been using for years...

Any clarification would be appreciated.

Thank you in advance.
Reply
#2

Controller filename and class names must be UCfirst, i.e. start with a capital letter and then have the rest lowercase.

https://www.codeigniter.com/user_guide/g...llers.html
Reply
#3

I understand you, but it's a coding standard that we follow here for CI.
There are those who tell lies with meaning behind them and those meaning less lies!
Reply
#4

Things change and you need to be open minded to change.

We all had to make these changes but for the most part they are for the good.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB