How to use codeignitor, i am a new bie for the codeignitor

I am new to codeignitor but a great wish to use it. I have made this code as my first program of codeignitor:
class HelloWorld extends Controller {
//intializer function
function HelloWord ()

function index()
$data['title'] = "My first application created with Code Ignitor";
$data['message'] = "Hello World!!!";

//load this to view
$this->load->view('helloworld', $data);

I saved this file in "application/view" folder but i don't know how to keep this code in one file or have to made separate file for html to show data on visitors browser

Welcome for complete lesson... for the begning...

Hi, welcome to CodeIgniter
What you have here, is a controller, so it should go in "application/controllers" and call it "helloworld.php".
You then need a seperate view file, which in this case will be called helloworld.php (as tats what you specify with the load->view function) which will go in application/views). The view file will now have access to the variables $title and $message, so you can output these in there.

I'd suggest if you've not already done so, read through the user guide start to finish, it will give you a great understanding of alll the basics Smile

[eluser]Johan André[/eluser]
The controller needs to go in application/controllers and the view in application/views.
Check out the userguide and the screencast on, it really explains it all...

Good luck!

Thanks a lot i will be with you time by time...

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme ¬© 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.