CodeIgniter: “Unable to load the requested class”

后端 未结 3 917
南旧
南旧 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-19 00:00

    I had a similar issue when deploying from OSx on my local to my Linux live site.

    It ran fine on OSx, but on Linux I was getting:

    An Error Was Encountered
    
    Unable to load the requested class: Ckeditor
    

    The problem was that Linux paths are apparently case-sensitive so I had to rename my library files from "ckeditor.php" to "CKEditor.php".

    I also changed my load call to match the capitalization:

    $this->load->library('CKEditor');
    

提交回复
热议问题