1. application/contig/autoload.php
$autoload['libraries'] = array('database','template');
$autoload['helper'] = array('url');
$autoload['helper'] = array('url');
2. application/contig/config.php
$config['base_url'] = 'http://localhost/oop/ciportal';
$config['index_page'] = '';
$config['index_page'] = '';
3. application/contig/databases.php
'hostname' => 'localhost',
'username' => 'root',
'database' => 'dbportal'
'username' => 'root',
'database' => 'dbportal'
4. application/contig/routes.php
$route['default_controller'] = 'berandausr';
5. application/libraries/Template.php
<?php
class Template {
var $template_data = array();
function set ($name,$value)
{
$this->template_data[$name] = $value;
}
function load($template = '', $view = '', $view_data = array(), $return = FALSE)
{
$this->CI =& get_instance();
$this->set('contents', $this->CI->load->view($view, $view_data, TRUE));
return $this->CI->load->view($template,$this->template_data, $return);
}
}
?>
class Template {
var $template_data = array();
function set ($name,$value)
{
$this->template_data[$name] = $value;
}
function load($template = '', $view = '', $view_data = array(), $return = FALSE)
{
$this->CI =& get_instance();
$this->set('contents', $this->CI->load->view($view, $view_data, TRUE));
return $this->CI->load->view($template,$this->template_data, $return);
}
}
?>
6. tambahkan htaccess klik disini dengan penempatan seperti gambar dibawah ini
Tidak ada komentar:
Posting Komentar