CodeIgniter: “Unable to load the requested class”

后端 未结 3 916
南旧
南旧 2021-02-18 23:01

On my WAMP box, I did the following:

  1. Added a file called /application/libraries/Foo.php
  2. Foo.php is a class, and it\'s name is Foo
  3. In
3条回答
  •  孤独总比滥情好
    2021-02-18 23:53

    In Windows, capitalization in paths doesn't matter. In Linux it does.

    When you autoload, use "Foo" not "foo".

    I believe that will do the trick.

    I think it works when you take it out of autoloading because codeigniter is smart enough to figure out the capitalization in the path and classes are case independent in php.

提交回复
热议问题