Welcome Guest, Not a member yet? Register   Sign In
encountering an undefined method error in CodeIgniter

I'm currently in the process of recoding my website using CodeIgniter and exploring the realm of MVC and other development patterns for the first time. To familiarize myself with the system's protocol, I've been following the video tutorials available on the CodeIgniter website to create a playground environment.

However, I've encountered an issue related to a parent class, which happens to be my first stumbling block. In the second tutorial, where I'm attempting to create a blog, I have the following code snippet:


class Test extends CI_Controller {

    function Test()


    // Rest of the code...


Upon loading the page, excluding the content within the function Test(), I noticed that the system was unable to find the "Controller" class. Upon further investigation, I discovered that the tutorial is based on an older version of CodeIgniter, and the correct name for the class is now "CI_Controller". With the revised code shown above, I am encountering the following error:

Fatal error: Call to undefined method CI_Controller::CI_Controller() in /Users/michaelsanger/Sites/CodeIgniter/application/controllers/test.php on line 7
I have extensively searched for a solution but haven't been able to determine the reason behind this error. Any insights or guidance on resolving this issue would be greatly appreciated, as I'm eager to proceed with my CodeIgniter development journey.

This is by a spammer. Banned.

Theme © iAndrew 2016 - Forum software by © MyBB