|
本帖最后由 a_酋长 于 2015-8-10 18:00 编辑
在CodeIgniter-3.0.0\system\core\Controller.php文件中
PHP复制代码 class CI_Controller {
public function __construct()
{
self::$instance =& $this;
// Assign all the class objects that were instantiated by the
// bootstrap file (CodeIgniter.php) to local class variables
// so that CI can run as one big super object.
foreach (is_loaded() as $var => $class)
{
$this->$var =& load_class($class);
}
// $this->load =& load_class('Loader', 'core');
// $this->load->initialize();
[color=#000000]// $load =& load_class('Loader', 'core');
// $load->initialize(); //
// var_dump($this->load);
log_message('info', 'Controller Class Initialized');
} 复制代码
1,蓝色的$this->load 是怎么理解呢?不知道 对load是怎么定义 是类class CI_Controller 的属性?还是方法?
2,那把 $this->load ($this->load =& load_class('Loader', 'core');) 换写成为 $load ( $load =& load_class('Loader', 'core');)为什么不可以呀? 求指导!!!谢谢!!!!
|
|