- Download https://www.codeigniter.com/download
- Extract Folder and Paste in (xampp/htdocs). and rename it to “CodeIgniter“.
- Now open (htdocs\CodeIgniter\application\controllers) Folder
- Create a File “home.php” and Paste this code: 1234567891011121314151617181920212223242526<?phpif ( ! defined('BASEPATH')) exit('No direct script access allowed');class Home extends CI_Controller {/*** Index Page for this controller.** Maps to the following URL* http://example.com/index.php/blog* - or -* http://example.com/index.php/blog/index* - or -* So any other public methods not prefixed with an underscore will* map to /index.php/blog/{method_name}* @see http://codeigniter.com/user_guide/general/urls.html*/public function index(){echo "Hello World Home Page";}}/* End of file Blog.php *//* Location: ./application/controllers/blog.php */?>
- Open “htdocs\CodeIgniter\application\config\routes.php” File.
- Change default_controller to ‘home‘. Like:1$route['default_controller'] = "home";
it means now ‘home.php’ is your default page
- Now Open “http://localhost/CodeIgniter/“. you will see ‘Hello World Home Page‘