CI gets the two-dimensional configuration array in the custom configuration file:
Such as:
The following configuration is available in the admin.php configuration file:
$config [' Admin_menu '] [] = Array (
' Name ' = ' Product management ',
' C ' = ' goods ',
' A ' = ' lists ',
' Icon ' = ' icon-gift ',
' Item ' = Array (
Commodity
0 = = Array (' name ' = = ' Product list ', ' c ' = ' = ' goods ', ' a ' = ' lists ', ' display ' = + 1, ' icon ' = ') ',
7 = = Array (' name ' = ' commodity query ', ' c ' = ' = ' goods ', ' a ' = ' goods_search ', ' display ' = + 0, ' icon ' = = '),
1 = = Array (' name ' + ' product add ', ' c ' = ' + ' goods ', ' a ' = ' + ' Add ', ' display ' = + 0, ' icon ' = = '),
2 = = Array (' name ' = ' product edit ', ' c ' = ' = ' goods ', ' a ' = ' = ' edit ', ' display ' = + 0, ' icon ' = '),
)
);
$config [' Admin_menu '] [] = Array (
' Name ' = ' product category ',
' C ' = ' goods_category ',
' A ' = ' lists ',
' Icon ' = ' icon-group ',
' Item ' = Array (
Classification
3 = = Array (' name ' = = ' commodity category ', ' c ' = ' goods_category ', ' a ' = ' lists ', ' display ' = + 1, ' icon ' = '),
4 = = Array (' name ' = ' Add ' category ', ' c ' = ' + ' goods_category ', ' a ' = ' + ' Add ', ' display ' = + 0, ' icon ' = = '),
8 = = Array (' name ' = ' edit category ', ' c ' = ' = ' goods_category ', ' a ' = ' = ' edit ', ' display ' = + 0, ' icon ' = = '),
)
);
Invoke the contents of the configuration file in the view file:
/* $CI = &get_instance ();
$CI->load->config (' admin ');
$admin _menu = Config_item (' Admin_menu '); */
$this->config->load (' admin ', TRUE);
$admin _menu = $expertid = $this->config->item (' Admin_menu ', ' admin ');
echo "<br>aname:". Print_r ($admin _menu);
CI gets the two-dimensional configuration array in the custom configuration file