我在HomeController.class.php 中写上了
$config = S('config');
if(empty($config)){
$config = config();
S($config);
}
C($config);在IndexController.class.php 中继承了HomeController.class.php
使用 var_dump(C());
能够看到$config中的配置,但是在其他的Controller中却没有$config中的配置,这是为什么呢? C()不是全局的吗?