Skip to content

Instantly share code, notes, and snippets.



Last active Aug 29, 2015
What would you like to do?
if (!defined('BASEPATH'))
exit('No direct script access allowed');
class Base_Controller extends CI_Controller
public function index()
// ignore
$this->_render_view('admin_view', '狗寶');
public function g1()
$this->_render_view('g1_view', '大一');
private function _render_view($main_view, $title, $main_data = array())
$header = array('title' => $title . ' - Tabo', 'user_display_name' => $display_name, 'page' => $this->uri->segment(2));
$this->load->view('header_view', $header);
if (empty($main_data)) {
else {
$this->load->view($main_view, $main_data);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.