CODEIGNITER: CREATING FIRST APPLICATION AT CODEIGNITER

CODEIGNITER: CREATING FIRST APPLICATION AT CODEIGNITER

CodeIgniter Step By Step Tutorial: As usually, we will create first application by build hello World application. But, before write code, we must know that we will build application use Model Controller View (MVC) pattern. We will talk about MVC in other post. MVC pattern in Joomla and It is same. 1. First, we make controller, create a file name “helloworld.php” within: C:\xampp\htdocs\CodeIgniter\system\application\controllers\. Enter following code: 1 # Next step, make a view. Create index_view.php within C:\xampp\htdocs\CodeIgniter\system\application\views.

Enter just simple line code like: 1 # Now, test your application. Point your browser to http://localhost/CodeIgniter/index.php/HelloWorld/ You should get like this:

Here we do not write any function name in the url and it load that function because there is a index function in our controller. So it auto call the index function and load the index_view.php Now we make one more function and call it. Make a function like bellow 1 Now make a new view file hello_view.php in C:\xampp\htdocs\CodeIgniter\system\application\views. write this text in the view file 1 Now, test your application. Point your browser to http://localhost/CodeIgniter/index.php/HelloWorld/hello You should get like this

See, this flow: