Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5998489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:24:49+00:00 2026-05-23T00:24:49+00:00

I’ve just started looking at PHP Frameworks after spending loads of wasted time doing

  • 0

I’ve just started looking at PHP Frameworks after spending loads of wasted time doing everything from scratch. I thought I would give Codeigniter a go after a friend recommended it to me.

I worked through the first tutorial and there were no issues but I’m getting stuck with the second one.

At first my code was identical to the tutorial:

<?php


class Blog extends CI_Controller{


    function Blog()
    {

        parent::CI_Controller();

        $this->load->scaffolding('entries');
    }


    public function index(){

        $data['title'] = "My Blog Title";
        $data['heading'] = "An intresting title";


        $data['todo'] = array('create media player','design site','finish project');

        $this->load->view('blog_view',$data);
    }
}

?>

But I got an internal server error. After looking at the user guide it shows a different way for using the constructor.

I changed the code to the document spec.

<?php


class Blog extends CI_Controller{


    public function __construct() {

        parent::__construct();

        $this->load->scaffolding('entries');
    }




    public function index(){

        $data['title'] = "My Blog Title";
        $data['heading'] = "An intresting title";


        $data['todo'] = array('create media player','design site','finish project');

        $this->load->view('blog_view',$data);
    }
}

?>

But I still get an internal error. I don’t know if my code is wrong or I misconfigured something else. Some advice would be good, thanks.

Edit:
To clarify – I only get an internal error when I add the constructor to the class.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T00:24:50+00:00Added an answer on May 23, 2026 at 12:24 am

    This will most likely because you’re trying to load scaffolding in the latest version of CodeIgniter.

    Scaffolding has been depreciated since version 1.6. It was removed in 2.0, and the latest version is now 2.0.2

    In terms of which of your provided snippets to use, the latter form of declaring a constructor (__construct) is preferred over using the Class name (Blog). This method is also consistent with the Core Classes of CodeIgniter since 2.0.

    As an aside, I’ve got no idea why CodeIgniter are including such out-of-date samples in their tutorials. EllisLab’s seem to have lost total interest in the CI project recently, which is a shame 🙁

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I have just tried to save a simple *.rtf file with some websites and
I'm looking for suggestions for debugging... If you view this site in Firefox or
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace
I want use html5's new tag to play a wav file (currently only supported
I have a JSP page retrieving data and when single or double quotes are
Seemingly simple, but I cannot find anything relevant on the web. What is the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.