Codeigniter constructors. What is the difference?

后端 未结 4 1145
轻奢々
轻奢々 2021-02-09 18:03

I see two types of contructors in CI. For instance...

class Blog extends CI_Controller
{
    function __construct()
    {
        parent::__construct();
    }
}
         


        
4条回答
  •  时光取名叫无心
    2021-02-09 18:26

    php 5 has changed the way constructors are called and used and you should use the second option. I think this is not specific to codeigniter and general to php5

提交回复
热议问题