* instalasi XAMPP ver 1.8
* download codeignitor_2.13
* copy folder codeignitor_2.13 ke c:\xampp\htdocs\codeignitor_2.13
* rubah folder codeignitor_2.13 jadi c:\xampp\htdocs\teknowarta
* edit file c:\xampp\htdocs\teknowarta\application\config\config.php
ubah : $config['base_url'] = 'http://localhost/teknowarta';
coba di browser : http://localhost/teknowarta
bila sukses akan tampil tulisan Welcome to CodeIgniter!
File controller pertama
buat file dengan editor notepad++ dengan nama : belajar.php
letakan di folder teknowarta\application\controller
<?php
class Belajar extends CI_Controller {
function index(){
echo "Salam, Dunia.......";
}
}
?>
coba di browser : http://localhost/teknowarta/index.php/belajar
Tambahan Fungsi
<?php
class Belajar extends CI_Controller{
function index() {
$this->load->view('cobaview');
}
}
?>
buat file : cobaview.php
letakan di folder teknowarta\application\view
<html>
<head>
<title>Web dengan PHP-CI</title>
</head>
<body>
<p>Coba fungsi view, mudah-mudahan sukses</p>
</body>
</html>
coba lihat tampilan di browser : http://localhost/teknowarta/index.php/belajar
Subscribe to:
Post Comments (Atom)
0 Response to "PHP_CodeIgniter Cara Instal dan Teknik Dasar (Bag.1)"
Post a Comment