-
Home
-
Blogs
-
Tutorial-1--CodeIgniter-PHP-Framework -
Tutorial - 1 | CodeIgniter PHP Framework
By Harsh Aggrawal | Jul, 09 2018 04:33

CodeIgniter is best framework my point of view for web development for beginners in PHP.
Let us know about best part of CodeIgnitor i.e it is open source as well as smaller in size, easier to download and setup your project in it.
Some basic feature of CodeIgniter are as follow-
1. CodeIgniter based on Model-View-Controller Based System.
2. Extremely Light Weight as I told you smaller in size. According to (https://codeigniter.com) CodeIgniter-3 has a 2MB download, including the user guide.
3. It have full Featured database classes with support for several platforms like MySql, MS SQL, Oracle etc.
4. Query Builder Database Support.
5. Form and Data Validation
6. Session Management
and so many features are available. View complete list visit CodeIgniter Features
Best part according to me i.e we can create separate modules in separate folder location called Modules (we will discussed later about this.) and for beginners can make core query I thing which is easy for beginners write own query rather than using pre made functions.
Firstly you can download CodeIgniter from its own site https://codeigniter.com. Currently Version 3.1.9 is stable released on 2018.06.12
Then follow these steps...
- Extract this folder in your root folder (www/htdocs).
- Then rename folder with your project name.
- Then open this folder, there are 2 main folder named like application,system and 1 php file named index.php, about index.php will discuses later.
- Then application which contains controllers,models,views,config,helper,library,logs,languages and cache these folder are useful for our project.
- Mainly we focused on 3 folder at beginning (controllers,models and views).
- Folder -controllers contain all your controllers basically controller is php file in which you can write all your php computation and manipulation script are writing.
- Folder -models contain all your models basically models is php file in which you can write mysql queires.
- Folder -views cantain all your views basically your html pages stored in this folder.
- Folder -config contains autoload,config,constants,database,doctypes,foreign_char,hooks,memcached,migration,mimes,profilers,routes,smileys,user_agents, but at beginning we need to concentrate on config, autoload,database and routes.
- File -config.php contain lots of variable but at starting we need to focus on base_url(). base_url() is pre defined function of ci in which we write url of our domain for example (http://example.com or http://localhost/project1). We will discussed later sessions.
- File -database.php contains your Mysql connection variable in you can write username,password,prefix etc.
- Now, open your browser and type http://localhost/your_folder_name
- Page looks some thing like as below
- That means CodeIgniter setup successfully.
- I hope you like this tutorial.
On next tutorial we will create controller, model and views file.
Thanks for reading, for more details go through
MyinboxHub - The Tutorial Points
Subscribe and comment below.
0 comments