- go to code igniter site and click download button.
- Installation Instruction.(Please refer to Code Igniter user guide.)
- Unzip the package.
- Upload the CodeIgniter folders and files to your server. Normally the index.php file will be at your root.
- Open the application/config/config.php file with a text editor and set your base URL. If you intend to use encryption or sessions, set your encryption key.
- If you intend to use a database, open the application/config/database.php file with a text editor and set your database settings.
2. create hello world php.
- create helloworld.php file in application/controllers folder with these codes.
class Helloworld extends CI_Controller {
public function __construct() {
parent::__construct();
}
function index()
{
echo 'Hello world!';
}
function test()
{
echo 'Second hello world!';
}
}
3. create hello world php with view.
- update helloworld.php file with these codes.
{
// echo 'Hello world!';
$this->load->view('helloview');
}
- create helloview.php file in application/view folder with these codes.
<html lang="en">
<head>
<meta charset="utf-8">
<title>Hello World App</title>
</head>
<body>
<h1>Hello World!</h1>
<div >
<p>My First CodeIgniter Application.
</div>
</body>
</html>
4. passing parameters to view.
- update helloworld.php file with these codes.
{
// echo 'Hello world!';
$data['message'] = 'Hello World!!!';
$this->load->view('helloview', $data);
}
- update helloview.php file with these codes.
<h1><?php echo $message; ?></h1>














