Applicationcontrollersaggregsor. php {code...} applicationlibrariesBase. php {code...} the above two parts must have an endless loop. I heard that the ci framework is quite easy to use. I have had an urgent project over the past few days. I used CI for a day and cried. I didn't even write a good log on. I wrote a wrong step... application/controllers/Sor. php.
Class extends Sor extends CI_Controller {public function index ($ page = 'home') {$ this-> load-> library ('base '); // If you use $ this-> load-> libraries ('base'); endless loops $ this-> base-> pageLogin (); print_r (8888 );}}
Application/libraries/Base. php
Class Base {public function _ construct () {$ this-> CI = & get_instance ();} public function pageLogin ($ must = false) {var_dump ($ this-> CI-> session); // If you use $ this-> session, an endless loop is required }}
The above two parts have an infinite loop.
I heard that the ci framework is quite easy to use. in the past few days, there was an urgent project. after using CI for a day, I cried and didn't even write a good log on. if I wrote a mistake, it would take an endless loop, can you give me an error, brother TAT.
Reply content:
Application/controllers/connector Sor. php
Class extends Sor extends CI_Controller {public function index ($ page = 'home') {$ this-> load-> library ('base '); // If you use $ this-> load-> libraries ('base'); endless loops $ this-> base-> pageLogin (); print_r (8888 );}}
Application/libraries/Base. php
Class Base {public function _ construct () {$ this-> CI = & get_instance ();} public function pageLogin ($ must = false) {var_dump ($ this-> CI-> session); // If you use $ this-> session, an endless loop is required }}
The above two parts have an infinite loop.
I heard that the ci framework is quite easy to use. in the past few days, there was an urgent project. after using CI for a day, I cried and didn't even write a good log on. if I wrote a mistake, it would take an endless loop, can you give me an error, brother TAT.
Shouldn't it be at the controller?
Function _ construct (){
parent::__construct()
Then introduce librari's
}
?
$this->load->library('Base');
When loading the class library, the name must correspond to the class library name!