Home > Article > Backend Development > CodeIgniter includes one controller and another controller, and an error will be reported when instantiating it.
<code>Unable to locate the specified class: Session.php </code>
Report the above error. There is this problem on stackOverflow. It is enough to change the referenced controller to extends CI_Model. However, I originally wanted to include the controller and cannot do that. How can I solve this problem?
Between the reference and the referenced controller, no error will be reported if the following code is written in any one of them. However, as long as the line that calls the constructor of the parent class is uncommented, an error will be reported again. Why is this? ? ?
<code> function __construct(){ //parent::__construct(); }</code>
<code>Unable to locate the specified class: Session.php </code>
Report the above error. There is this problem on stackOverflow. It is enough to change the referenced controller to extends CI_Model. However, I originally wanted to include the controller and cannot do that. How can I solve this problem?
Between the reference and the referenced controller, no error will be reported if the following code is written in any one of them. However, as long as the line that calls the constructor of the parent class is uncommented, an error will be reported again. Why is this? ? ?
<code> function __construct(){ //parent::__construct(); }</code>
Maybe it’s because the relative path changed when you quoted it. Why do you need to quote the controller?
Why reference another controller? ? ? ? ?