Thursday, 16 June 2016

Create Simple Template in codeigniter

Easy Step to create Template in Codeigniter.

Step1. Create codeIgniter folder in c:\xampp\htdocs\.


Step2. And open your text editor. For example I am use Sublime text. And Write to below code and save to Home.php in C:\xampp\htdocs\codeIgniter\application\controllers folder.

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

class Home extends CI_Controller {
    public function index()
    {
        $this->load->view('home_view');
    }
}
?>



Step3. Create new page and save to  home_view.php in C:\xampp\htdocs\codeIgniter\application\views folder. and write to below code.

<!DOCTYPE html>
<html>
<head>
    <title>Simple Design Demo</title>
</head>
<body>
    <div style="width:50%; margin: auto; text-align: center; height:50; background-color:#DDD; padding:20px;">
        <h1 style="font-family:tahoma">Hello World</h1>
    </div>
</body>
</html>



Step4. Open routes.php file in C:\xampp\htdocs\codeIgniter\application\config\ folder. and edit below code.


$route['default_controller'] = 'Home';


Step5. Open your browser in your server. and run the program. with http://localhost/codeigniter/ or click in link. and view like this.




 

Tuesday, 14 June 2016

Database setup in Codeigniter


Four step to easy install database setup. First Install Codeigniter Project in your server.

Step 1.  After  Open your Codeigniter project. and Double Click to application folder.




Step 2.  After Double Click to config folder


  
Step 3. After open database file. and edit your Database details.

Step 4 .  Below database change in database.php file. You can write to change database details.




This Database is complete setup. If you any Queries to write comment in this database page.


Monday, 13 June 2016

how to codeigniter install

Step 1.  Open Codeigniter Website and download a Codeigniter code. or Click here to download the Codeigniter code.


Step 2. After Unzip Codeigniter Package in  your server.


Step 3:  Upload your Codeigniter  folder  in your localhost.

Step 4. And Open Browser in your Server. Click Here to open Codeigniter project. View below Image.