尝试调用lang()函数,该函数是codeigniter的系统/帮助程序(language_helper.php)的一部分,导致致命错误
Fatal error: Call to undefined function lang()
$def_actions['add'] = array('name' => lang('carbogrid_add'), 'alias' => 'add', 'url' => $this->add, 'icon' => 'ui-icon-circle-plus', 'toolbar' => TRUE, 'grid' => FALSE);
答案 0 :(得分:12)
在执行此操作之前,您必须加载帮助程序:
$this->load->helper('language');
$def_actions['add'] = array('name' => lang('carbogrid_add'), 'alias' => 'add', 'url' => $this->add, 'icon' => 'ui-icon-circle-plus', 'toolbar' => TRUE, 'grid' => FALSE);