Hello World di Codeigniter

Setelah kita mengatur /application/config, kita belajar membuat “Hello World” pada Codeigniter. Ok, sekarang kita buat view terlebih dahulu. Kita buat file hello_view.php di /application/views/

<html>
<head>
<title>Hello World!</title>
</head>
<body>
<p>Hello World di Codeigniter 2.1.0. Di sini kita belajar memahami codeigniter</p>
</body>
</html>

Setelah membuat file view lalu kita buat controller. Kita buat file hello.php di /application/controllers/

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Hello extends CI_Controller {
function __construct()
{
parent::__construct();
}

function index()
{
$this->load->view('home_view');
}
}

Setelah itu kita jalankan di

http://localhost/belajar_ci/index.php/hello

Comments

9 responses to “Hello World di Codeigniter”

  1. artikel motivasi Avatar
    artikel motivasi

    Thank atas tips dan tutorialnya sangat bermanfaat

    cerita motivasi

  2. Lestari News Avatar

    temen2 pada make CI nih, harus belajar juga kayaknya

  3. trye Avatar
    trye

    thank you tips nya 🙂

  4. Hary Avatar

    Wah ternyata CI tidak sesulit yang saya sangka ya hahaha.. BTW. Thanks guide-nya gan :).

    Salam,
    Hary

  5. billy Avatar

    waaah…masi bingung hehe

  6. Pondok Print Avatar
    Pondok Print

    hihihihi
    jadi keingetan pas kuliah buat gituan pake c++ dan php

  7. sitirobiah Avatar
    sitirobiah

    qok gk tampil

  8. sopiah Avatar

    nice gans infonya

Leave a Reply to artikel motivasi Cancel reply

Your email address will not be published. Required fields are marked *