Welcome Guest, Not a member yet? Register   Sign In
Error-Object of class could not be converted to string
#1

[eluser]Tanvir[/eluser]
I am new to codeigniter.I have the following files

controller/products/shoes.php And views/products/shoesview.html

This is the controller class shoes.php -

Code:
<?php
class Shoes extends CI_Controller
{
    public function index()
    {
    $$this->load->view('products/shoesview');
    }
}
?>
The view file-shoesview.html is a simple html file.
Now if i try this as url - ..localhost/codeigniter/index.php/products/shoes
I get the following error-
A PHP Error was encountered

Severity: 4096

Message: Object of class Shoes could not be converted to string

Filename: products/shoes.php

Line Number: 17
Fatal error: Call to a member function view() on a non-object in C:\xampp\htdocs\CodeIgniter\application\controllers\products\shoes.php on line 17


Messages In This Thread
Error-Object of class could not be converted to string - by El Forum - 08-15-2011, 06:28 AM
Error-Object of class could not be converted to string - by El Forum - 08-15-2011, 07:08 AM
Error-Object of class could not be converted to string - by El Forum - 08-15-2011, 09:25 AM
Error-Object of class could not be converted to string - by El Forum - 08-15-2011, 09:36 AM
Error-Object of class could not be converted to string - by El Forum - 08-15-2011, 09:51 AM
Error-Object of class could not be converted to string - by El Forum - 08-15-2011, 09:53 AM
Error-Object of class could not be converted to string - by El Forum - 08-15-2011, 10:07 AM



Theme © iAndrew 2016 - Forum software by © MyBB