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

  • Home
  • SEARCH
  • 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 7613249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:06:38+00:00 2026-05-31T02:06:38+00:00

Excuse me if this is slightly newbie. I have the main view located @

  • 0

Excuse me if this is slightly newbie.

I have the main view located @ app/views/index.php as:

<?php echo $head ?>

</head>
<body>

<div id="container">
    <h1>Welcome to CodeIgniter!</h1>

    <div id="body">
        <p>The page you are looking at is being generated dynamically by CodeIgniter.</p>

        <p>If you would like to edit this page you'll find it located at:</p>
        <code>application/views/welcome_message.php</code>

        <p>The corresponding controller for this page is found at:</p>
        <code>application/controllers/welcome.php</code>

        <p>If you are exploring CodeIgniter for the very first time, you should start by reading the <a href="user_guide/">User Guide</a>.</p>
    </div>

    <p class="footer">Page rendered in <strong>{elapsed_time}</strong> seconds</p>
</div>

</body>
</html>

The header_meta.php file located at (app/views):

<!DOCTYPE html>
<html>
<head>
    <title>Title</title>
    <link rel="icon" type="image/png" href="img/favicon.ico" />
    <!--meta-->

the controller, named SpecialPage.php located at app/controllers/:

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class SpecialPage extends CI_Controller {

    function SpecialPage(){
        parent::CI_Controller();
    }

    public function index()
    {
        $head = $this->load->view('header_meta', '', true);
        $this->load->view('index', array('head' => $head));
    }
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */

Error I’m getting on SpecialPage.php controller:
Call to undefined method CI_Controller::CI_Controller() on line 6
which is:
function SpecialPage(){
parent::CI_Controller();
}

Why is this still just showing a 404 error?????

  • 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-31T02:06:39+00:00Added an answer on May 31, 2026 at 2:06 am

    I suppose it’s this line:

    <?php $this->load->view('header_meta.php'); ?>
    

    The “.php” extension seems to be the culprit.

    BTW, I do not recommend using PHP code in your views (except echoes and loops). Much better is to compose it in your controller:

    $head = $this->load->view('header_meta', '', true);
    $this->load->view('index', array('head' => $head));
    

    Obviously, the “$t>l>v()” must be changed to “echo $head”. Or, the way I prefer (using a template view):

    $body = $this->load->view('index', '', true);
    $this->load->view('template', array('body' => $body));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry if this sounds dumb, excuse this newbie. Here is my code line=abcd<>efgh->higk<-1234 v1=$(echo
I am a newbie to PHP still, so excuse this question if it seems
I am a patterns newbie so please excuse this question if it sounds too
Excuse the n00bness of this question, but I have a web application where I
Excuse me if this is the wrong place to ask. I have been using
I am kind of a newbie so excuse me if this question is too
I'm sure this is a very basic procedure, so excuse this newbie question. How
Please excuse me if this is a noob question. I have tried every possibility
Please excuse me if this is a bit of a noob issue: I have
I am a newbie, so excuse me if this is a silly question ..

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.