Class Names - Case Sensitive Or Not?

Hi all,

I am using CDbCriteria class in 2 controllers and in one of them, I wrote it as CDbcriteria. I got the following error:

“include(CDbcriteria.php) [<a href=‘function.include’>function.include</a>]: failed to open stream: No such file or directory”. I had to correct it to CDbCriteria for it to work.

In the other controller it is written in the same way (CDbcriteria) and it works fine. Why is it so?

Hi Jimlam,

Were in the other controller any requests to db before using CDbcriteria? If so, then proper CDbCriteria file may be loaded by CActiveRecord methods and your class will not trigger php autoload.

Hi Antoncpu,

Thanks for your reply. In the other controller, there was a findAll() request on another table of the db. You are right, when I commented these lines, I got the message error there also. Thanks, I’ve learnt something new.