Welcome Guest, Not a member yet? Register   Sign In
Object not found error
#1

[eluser]Unknown[/eluser]
I can't figure out why I'm getting the "Object not found!" error.

Following are the steps I've taken, anyone see where I went wrong?

1. Unzipped code-igniter into htdocs; named folder "code-igniter"
2. Created the following controller and saved it as "home.php" in system/application/controllers
Code:
<?php
public class Home extends Controller {

    public function __construct() {
        parent::Controller();
    }
    public function index() {    
        $content = array();
        $content['title'] = 'Welcome!';
        $content['body'] = $this->load->view('testing', '', true);
        $this->load->view('template', $content);
    }

}
?>
3. Created "template.php" and "testing.php" views; saved in system/application/views
4. Entered the url --> http://localhost/code-igniter/home.php/index
#2

[eluser]Jeroen Brussich[/eluser]
Don't you mean: http://localhost/code-igniter/index.php/home ?
#3

[eluser]Unknown[/eluser]
[quote author="Jeroen Brussich" date="1260403136"]Don't you mean: http://localhost/code-igniter/index.php/home ?[/quote]

Ah... the problem was I did know that the "index.php" (the one provided by CI) was required in the URL (as it acts as a front controller/router). Thanks.




Theme © iAndrew 2016 - Forum software by © MyBB