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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:53:35+00:00 2026-06-11T19:53:35+00:00

I have my own MVC and autoloader that loads classes. Everything works except that

  • 0

I have my own MVC and autoloader that loads classes. Everything works except that my base View.php is in Core folder and its render function does the following:

   public function render($file) {
        include('Project/Views/index/header.php');
        include('Project/Views/'.strtolower($file).'.php');
        include('Project/Views/index/footer.php');
   }

View.php uses a namespace

namespace Core;

when i go to my index page it gives:

Warning: include(Projcet/Views/index/header.php): failed to open stream: No such file ...

I tried the following: i added

use Project\Views;

and instead of include i did:

$header = new Views\index\header();

This shows the header on the page but it also gives an error:

'Project\Views\index\header' not found

I know its because header.php is not a class. It’s a view file. So I don’t know, how to include the file, when autoloader is loading the View.php for base Controller.

  • 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-06-11T19:53:36+00:00Added an answer on June 11, 2026 at 7:53 pm

    The error message (if you copy-pasted it verbatim) looks like you’re including files from the wrong folder:

    Warning: include(Projcet/Views/index/header.php): failed to open stream: No such file …

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

Sidebar

Related Questions

I have extended the ASP.NET MVC Html Helper to include my own ValidationImage that
I have my own routing rules in routes.php, defined for all the pages that
I have a titanium based iOS app that basically is following my own MVC
I have been developing my own PHP MVC framework. Now I have seen different
FulePHP is a HMVC framework that allows 'modules' to have their own MVC structure.
I have made my own php MVC framework and have also written its documentation.
I have created blank Asp.Net-MVC 3 web application and want to write my own
I have own component which works in my testing winform app good but when
I have created my own mvc pattern based on the codeigniter framework style. My
I have situation like this: I am doing my own mvc project in visual

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.