Web polresacehtamiang.com: Perbedaan antara revisi
Loncat ke navigasi
Loncat ke pencarian
Tidak ada ringkasan suntingan |
Tidak ada ringkasan suntingan |
||
Baris 1: | Baris 1: | ||
buat dalam folder config : | |||
autoload.php | autoload.php | ||
Baris 13: | Baris 13: | ||
'database' => '', | 'database' => '', | ||
dalam folder controller.php | |||
buat file cotroller.php yang isinya : | buat file cotroller.php yang isinya : | ||
<?php | <?php |
Revisi per 10 Juni 2024 09.53
buat dalam folder config :
autoload.php $autoload['libraries'] = array('database');
config.php $config['base_url'] = 'http://localhost/polres/';
database.php 'hostname' => 'localhost', 'username' => , 'password' => , 'database' => ,
dalam folder controller.php buat file cotroller.php yang isinya : <?php defined('BASEPATH') OR exit('No direct script access allowed');
class Web extends CI_Controller {
function __construct(){ parent::__construct(); $this->load->helper('url'); }
public function index(){ $data['judul'] = "Halaman depan"; $this->load->view('v_index',$data); }
}