Welcome Guest, Not a member yet? Register   Sign In
Filenaming question
#1

[eluser]Majd Taby[/eluser]
Hey, I keep having this problem over and over and I can't pinpoint it to exactly what it is.

My apps would work perfect on my local dev server (iMac on OS X), but when I move it to the shared folder and setup the configs, I get a bunch of "file was not found" I notice in the error though, the file names are not capitalized.

So what's the end-all be-all answer to this question?
#2

[eluser]eedfwChris[/eluser]
I am sure whatever web server you are running on Mac does not see http://domain.com/User/ differently than http://domain.com/user/ whereas other servers (or platforms) do.

This is definitely something that should be changed in CI for two reasons:
1) you know for a fact none of us want to keep track of $this->Whatever_Model and $this->load->model('Whatever_Model','whatever_model') is just ugly.
2) the noted problem that zaatar has had with "cross server" handling of cases.


What I have found is that if CI loads your class it MUST be "Proper" case and by load I mean either:
a) You use the autoloader
b) You are extending a base class

I think the idea is that controllers are allowed to be non "Proper" case since you are directly linking to them using the URL...... So unless you want to force the user to use http://domain.com/User/ then the filename should be undercase.
#3

[eluser]Majd Taby[/eluser]
the way I fixed it is, using strtolower in all my redirects and actions. I know it's a really ugly solution but it works. the reason i use it is cause I need to define the controller name in Proper case, and i don't want to have two fields (controller_name, and small_controller_name).




Theme © iAndrew 2016 - Forum software by © MyBB