Welcome Guest, Not a member yet? Register   Sign In
Begginer ask
#1

[eluser]Kentus[/eluser]
Ok, i'm new in this domain, and i want in this topic to expose my problems that i'll receive for this framework.

I buy a domain: http://earth-war.eu/ and i tried to make the samples from video tutorials where i'll learn to make my own blog.

For the first video i've received some errors:
first said that:
Fatal error: Class 'Controller' not found in /home2/earthwar/public_html/Blog/application/controllers/blog.php on line 3

for the next code:
<?php

class Blog extends Controller{

function index()
{
echo'Hello World'
}

}

?>

I replaced Controller() with CI_Controller and worked, but when i tried to create the constructor i received this:

Fatal error: Call to undefined method CI_Controller::CI_Controller() in /home2/earthwar/public_html/Blog/application/controllers/blog.php on line 7

I replaced with Controller but same error undefined method CI_Controller::Controler().
The code:
<?php

class Blog extends CI_Controller{

function Blog()
{
parent::CI_Controller();
}
function index()
{
$data['title']="My Blog Title";
$data['heading']="My Blog Heading";
$data['todo']=array('Clean house','eat lunch','call mom');
$this->load->view('blog_view',$data);
}

}

?>

Please helpSmile i'm a little stuck on this error and i don't know what to do.
Thanks a lot for future help.
One more thing.. if you see errors in my grammar or my exprimation pls correct me if you have timeSmile). Thanks again


Messages In This Thread
Begginer ask - by El Forum - 02-01-2011, 12:59 PM
Begginer ask - by El Forum - 02-01-2011, 01:07 PM
Begginer ask - by El Forum - 02-01-2011, 01:19 PM
Begginer ask - by El Forum - 02-06-2011, 02:00 AM
Begginer ask - by El Forum - 02-06-2011, 02:44 AM
Begginer ask - by El Forum - 02-06-2011, 02:52 AM
Begginer ask - by El Forum - 10-15-2012, 12:22 PM



Theme © iAndrew 2016 - Forum software by © MyBB