Home>

First, 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>

Second, load the child template file in the template file:

<?php $this->load->view ("admin_head.php");?>
<?php $this->load->view ("admin_foot.php");?>

Third, the function can be used directly in the template file to call the data

Fourth, the ci object is called in the model

$ci =&get_instance ();
$ci->load->model ("data_model");
php
  • Previous Tutorial for installing IPython and configuring Python development environment under Linux
  • Next Mysql simple tutorial (2)