|
helper 辅助函数中可以调用model 和 library吗,如何调用?
比如说我在自己写的辅助函数中使用
$this->session->userdata('user_id');
就会报如下错误:
Fatal error: Using $this when not in object context in D:\wamp\www\mmbeep.cn\system\application\helpers\calendar_helper.php on line 6
我在控制器中有加载session类的
控制器的加载的model也不能在helper中使用
各位前辈,这是咋回事呢? |
|