Home > Backend Development > PHP Tutorial > CodeIgniter includes one controller and another controller, and an error will be reported when instantiating it.

CodeIgniter includes one controller and another controller, and an error will be reported when instantiating it.

WBOY
Release: 2016-08-04 09:19:02
Original
1185 people have browsed it

<code>Unable to locate the specified class: Session.php
</code>
Copy after login
Copy after login

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>
Copy after login
Copy after login

Reply content:

<code>Unable to locate the specified class: Session.php
</code>
Copy after login
Copy after login

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>
Copy after login
Copy after login

Maybe it’s because the relative path changed when you quoted it. Why do you need to quote the controller?

Why reference another controller? ? ? ? ?

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template