'Fatal error: Uncaught Error: Failed opening required 'C:\xampp\htdocs\worldtravellen\app/views/inc/header.php'

I got the following error when I want to go to the "about.php" page even though my core.php and controller.php are set correctly:

Fatal error: Uncaught Error: Failed opening required 'C:\xampp\htdocs\worldtravellen\app/views/inc/header.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\worldtravellen\app\views\pages\about.php:1 Stack trace: #0 C:\xampp\htdocs\worldtravellen\app\libraries\Controller.php(22): require_once() #1 C:\xampp\htdocs\worldtravellen\app\controllers\Pages.php(22): Controller->view('pages/about', Array) #2 C:\xampp\htdocs\worldtravellen\app\libraries\Core.php(45): Pages->about() #3 C:\xampp\htdocs\worldtravellen\public\index.php(6): Core->__construct() #4 {main} thrown in C:\xampp\htdocs\worldtravellen\app\views\pages\about.php on line 1

about.php

<?php require APPROOT . '/views/inc/header.php'; ?>
    <h1><?php echo $data['title'];  ?></h1>
    <p><?php echo $data['description']; ?></p>
    <p>Version: <strong><?php echo APPVERSION ?></strong></p>

my APPROOT is defined within my config.php file

$a = define('APPROOT', dirname(__FILE__,2));


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source