CodeIgniter - accessing $config variable in view

后端 未结 11 1077
青春惊慌失措
青春惊慌失措 2020-12-23 12:52

Pretty often I need to access $config variables in views. I know I can pass them from controller to load->view(). But it seems excessive to do i

11条回答
  •  旧时难觅i
    2020-12-23 13:25

    $config['cricket'] = 'bat'; in config.php file

    $this->config->item('cricket') use this in view

提交回复
热议问题