Home > Article > Backend Development > Summary of common methods of CI framework, summary of ci framework_PHP tutorial
The examples in this article describe the common methods of CI framework. Share it with everyone for your reference, the details are as follows:
1. Load css and js files in the template file:
<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>
2. Load the sub-template file in the template file:
<?php $this->load->view('admin_head.php');?> <?php $this->load->view('admin_foot.php');?>
3. Function call data can be used directly in the template file
4. Calling CI objects in the model
$CI =& get_instance(); $CI->load->model('Data_model');
Readers who are interested in more CodeIgniter related content can check out the special topics of this site: "codeigniter introductory tutorial", "CI (CodeIgniter) framework advanced tutorial", "php excellent development framework summary", "ThinkPHP introductory tutorial", "Summary of Common Methods in ThinkPHP", "Introduction Tutorial on Zend FrameWork Framework", "Introduction Tutorial on PHP Object-Oriented Programming", "Introduction Tutorial on PHP MySQL Database Operation" and "Summary of Common PHP Database Operation Skills"
I hope this article will be helpful to everyone’s PHP program design based on the CodeIgniter framework.