一、在模板文件中加载css、js文件:
[html] view plain copy
< link rel = "stylesheet" type = "text/css" href = "<?=base_url('css/style.css')?>" /> < link rel = "stylesheet" type = "text/css" href = "<?=base_url('js/kindeditor/themes/default/default.css')?>" /> < link rel = "shortcut icon" href = "<?=base_url('images/favicon.ico')?>" /> < script type = "text/javascript" src = "<?=base_url('js/jquery.min.js')?>" > </ script > < script type = "text/javascript" src = "<?=base_url('js/admin.public.js')?>" > </ script > < script type = "text/javascript" src = "<?=base_url('js/jquery.artDialog.js?skin=default')?>" > </ script > < script type = "text/javascript" src = "<?=base_url('js/datejs/WdatePicker.js')?>" > </ script > < script type = "text/javascript" charset = "utf-8" src = "<?=base_url('js/kindeditor/kindeditor-min.js')?>" > </ script >
二、在模板文件中加载子模板文件:
[php] view plain copy
<?php $this ->load->view( 'admin_head.php' );?>
[php] view plain copy
<?php $this ->load->view( 'admin_foot.php' );?>
三、模板文件中可以直接使用函数调用数据
四、模型中调用CI对象
[php] view plain copy
$CI =& get_instance(); $CI ->load->model( 'Data_model' );
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did27075