Web Programming TutorialsInstalling CodeIgniter in PHP

Installing CodeIgniter in PHP

Till now, we wrote PHP programs in a text editor like notepad/notepad++. But to complete our work fast, we have been provided with a framework which will make our task easier and faster. This framework is CodeIgniter. CodeIgniter is provided with many code libraries, reusable classes and functions that make our development process faster. So let us now learn how to install CodeIgniter in this Installing CodeIgniter in PHP tutorial.

  • Let us see the installation process step by step:
    • Step 1: Go to the website www.codeigniter.com and browse to the Download tab as shown below:
    • codeigniter_website
      fig 1

    • Now download the CodeIgniter. A ZIP file will be downloaded.
    • Step 2: Next step is to unzip the file. You can unzip the file directly in the htdocs folder of your xampp folder or unzip it in another folder of your local machine and then copy and paste it in htdocs folder.
    • I have extracted the zip file to a folder on local machine, it is shown below:
    • folder_extracted
      fig 2

    • Now I will copy this folder named CodeIgniter-2-2-stable shown in above figure and paste it in the htdocs folder of xampp folder which is in C drive.
    • codeigniter_folder_in_htdocs_folder
      fig 3

    • Step 3: Now rename the CodeIgniter-2-2-stable folder in htdocs to CodeIgniter for simplicity as shown below:
    • renaming_codeigniter
      fig 4

    • CodeIgniter is now setup successfully.
    • Step 4: Now open the CodeIgniter-2.2-stable/application/config/config.php file with notepad/notepad++ which is inside the CodeIgniter folder in htdocs folder and set the base URL to http://localhost/CodeIgniter i.e. to the path of the CodeIgniter folder.
    • The base URL statement in the config.php file will look as shown below:
    • $config['base_url'] = 'http://localhost/CodeIgniter';
    • The config.php file opened with notepad is shown below:
    • config_file_opened_with_notepad
      fig 5

    • After writing the base URL in config.php file, save it and then close the file.
    • Step 5: Now open your browser and write the following address in its address bar:
    • http://localhost/CodeIgniter

    • After writing this address in the address bar, when you press enter, you will get the following page with welcome message as shown below:
    • welcome_page
      fig 6

    • This indicates that CodeIgniter has been installed successfully.

Thus we studied the step by step installation of CodeIgniter in our Installing CodeIgniter in PHP tutorial.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Exclusive content

- Advertisement -

Latest article

21,501FansLike
4,106FollowersFollow
106,000SubscribersSubscribe

More article

- Advertisement -