Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <?php
  2. defined('BASEPATH') OR exit('No direct script access allowed');
  3.  
  4. class Welcome extends CI_Controller {
  5.  
  6.     /**
  7.      * Index Page for this controller.
  8.      *
  9.      * Maps to the following URL
  10.      *      http://example.com/index.php/welcome
  11.      *  - or -
  12.      *      http://example.com/index.php/welcome/index
  13.      *  - or -
  14.      * Since this controller is set as the default controller in
  15.      * config/routes.php, it's displayed at http://example.com/
  16.      *
  17.      * So any other public methods not prefixed with an underscore will
  18.      * map to /index.php/welcome/<method_name>
  19.      * @see https://codeigniter.com/user_guide/general/urls.html
  20.      */
  21.     public function index()
  22.     {
  23.         $this->load->view('welcome_message');
  24.     }
  25.  
  26.     public function about()
  27.     {
  28.         // fungsi untuk me-load view about.php
  29.         $this->load->view('about');
  30.     }
  31.  
  32.     public function contact()
  33.     {
  34.         // fungsi untuk me-load view contact.php
  35.         $this->load->view('contact');
  36.     }
  37.    
  38. }