Home  >  Article  >  Backend Development  >  Summary of common methods of CI framework, summary of ci framework_PHP tutorial

Summary of common methods of CI framework, summary of ci framework_PHP tutorial

WBOY
WBOYOriginal
2016-07-12 08:52:13945browse

A summary of common methods of CI framework, a summary of ci framework

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="<&#63;=base_url('css/style.css')&#63;>" />
<link rel="stylesheet" type="text/css" href="<&#63;=base_url('js/kindeditor/themes/default/default.css')&#63;>" />
<link rel="shortcut icon" href="<&#63;=base_url('images/favicon.ico')&#63;>" />
<script type="text/javascript" src="<&#63;=base_url('js/jquery.min.js')&#63;>"></script>
<script type="text/javascript" src="<&#63;=base_url('js/admin.public.js')&#63;>"></script>
<script type="text/javascript" src="<&#63;=base_url('js/jquery.artDialog.js&#63;skin=default')&#63;>"></script>
<script type="text/javascript" src="<&#63;=base_url('js/datejs/WdatePicker.js')&#63;>"></script>
<script type="text/javascript" charset="utf-8" src="<&#63;=base_url('js/kindeditor/kindeditor-min.js')&#63;>"></script>

2. Load the sub-template file in the template file:

<&#63;php $this->load->view('admin_head.php');&#63;>
<&#63;php $this->load->view('admin_foot.php');&#63;>

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.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1127868.htmlTechArticleA summary of common methods of CI framework, a summary of ci framework. This article describes the common methods of CI framework with examples. Share it with everyone for your reference, the details are as follows: 1. Load css and js files in the template file...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn