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 6846519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:37:56+00:00 2026-05-27T00:37:56+00:00

I have setup a fresh install of codeigniter 2x and modular extensions (https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/wiki/Home) It

  • 0

I have setup a fresh install of codeigniter 2x and modular extensions (https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/wiki/Home)

It is my first time using HMVC, the decision to move from MVC to HMVC was to give myself more control of my login, admin, and members areas.

I have created my first controller in HMVC like so….

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

class Home extends MX_Controller {


    function __construct()
    {
        parent::__construct();  
        $this->load->model('Content_model');
    }


    public function index()
    {

        $this->load->view('includes/template'); 
    }
}

and a view like:

<?php echo doctype(); ?>

<html lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title><?php echo $pagecontent['seo_title']; ?></title>
         <meta name="description" content="<?php echo $pagecontent['seo_description']; ?>" />
        <meta name="keywords" content="<?php echo $pagecontent['seo_keywords']; ?>" />
        <meta name='robots' content='all' />

        <link rel="icon" type="image/ico" href="<?php echo base_url("images/favicon.png"); ?>" />
        <?php echo link_tag('css/style.css'); ?>
 <script type="text/javascript"  language="javascipt" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
 <script type="text/javascript" language="javascript" src="<?php echo base_url("js/jquery.validate.min.js"); ?>"></script>
<script type="text/javascript" language="javascript" src="<?php echo base_url("js/main.js"); ?>"></script>


    </head>
    <body>
        <?php $this->load->view('includes/notify'); ?>

        <div id="topbar">
            <?php $this->load->view('includes/topbar'); ?>

When I try and view the page in my browser I get the following error:

Fatal error: Call to undefined function doctype() in C:\xampp\htdocs\mintfifty\application\modules\site\views\includes\template.php on line 1

The code has worked in all my previous codeigniter (mvc) projects but not (hmvc) why is it not working in HMVC? What am I doing wrong?

  • 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-27T00:37:57+00:00Added an answer on May 27, 2026 at 12:37 am

    This issue is not likely to be caused by HMVC. doctype() function is defined in html helper and it seems that You have not loaded it (Unless you have auto-loaded it). Just load the html helper in your controller and it should work fine.

    public function index()
    {
        $this->load->helper('html');
        $this->load->view('includes/template'); 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have setup coredata in my appDelegate, but it first loads the mainWindow.xib and
I have a fresh install of Zend Framework v1.10.5 on my application server. The
I have a fresh install (started with a wiped drive) of Snow Leopard with
I have a VPS running a fresh install of Ubuntu 10.04 LTS. I'm trying
Codeigniter v2.0 that was released on the 28th. I just setup a fresh installation
I have setup web dav on windows server 2008. It seems to work fine
I have setup a property and implement INotifyPropertyChanged like so... public event PropertyChangedEventHandler PropertyChanged;
I have setup svnserve and for now now I am testing a repository with
I have setup multiple SQL Service Broker Queues in a database but have not
I have setup file of winform. but i want to change my icon how

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.