Require(): Failed opening required (include_path='.;C:\xampp\php\PEAR')

Viewed 48227

I have created a website using mvc framework, but I cant include php files in files that are from another folder. For example, I have model, view, controller and core folders, if I do the following require 'Core/User.php'; in a view file in view folder, then I get the following error:

Warning: require(Core/User.php): failed to open stream: No such file or directory 
in C:\xampp\htdocs\k2\View\customer-management.php on line 2

Fatal error: require(): Failed opening required 'Core/User.php' 
(include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\k2\View\customer-management.php 
on line 2

I've tried using ../Core/User.php, but the application becomes too messy and i need a cleaner way of doing this, perhaps working with php.ini or .htaccess to allow me to just include('Core/User.php'); from another folder. Any help would be appreciated.

1 Answers
Related