Now lets learn how to make a helloworld application in codeigniter.
Download codeigniter-> extract it->rename to "test" so now "test" is your application name. You are going to access your application like
http://localhost/test
open test folder you can find another folder called application.
inside application folder there are lot of other folders and we ned to take care about four folders
1. Controller
2. Model
3. View
4. Config
open a notepad
<?php
echo "helloworld";
?>
save it as hello.php in view folder.
open view folder (application/view)
open controller folder, you can find a welcome controller file just copy and paste it in same folder and rename it to hello.php
now open that hello.php,
change class name from "welcome" to "Hello" there is one more change
$this->load->view("hello")
so our first hello.php will be loaded.
Now save everything and open a browser
http://localhost/test/index.php/hello
will print "helloworld"
:)
Download codeigniter-> extract it->rename to "test" so now "test" is your application name. You are going to access your application like
http://localhost/test
open test folder you can find another folder called application.
inside application folder there are lot of other folders and we ned to take care about four folders
1. Controller
2. Model
3. View
4. Config
open a notepad
<?php
echo "helloworld";
?>
save it as hello.php in view folder.
open view folder (application/view)
open controller folder, you can find a welcome controller file just copy and paste it in same folder and rename it to hello.php
now open that hello.php,
change class name from "welcome" to "Hello" there is one more change
$this->load->view("hello")
so our first hello.php will be loaded.
Now save everything and open a browser
http://localhost/test/index.php/hello
will print "helloworld"
:)
No comments:
Post a Comment