daveh / php-mvc

A simple PHP model-view-controller framework, built step-by-step as part of the "Write PHP like a pro: build an MVC framework from scratch" course on Udemy.
https://davehollingworth.com/go/phpmvc/
MIT License
782 stars 311 forks source link

Accessing App\Config from public dir #105

Closed pf-tech closed 2 years ago

pf-tech commented 2 years ago

Hello,

Is it possible to access the App\Config file from the public folder? My goal is to set \App\Config::VAR and access it in public\nested_dir.

Thanks!

daveh commented 2 years ago

You can either require the class file manually using require, or include Composer's autoloader (as we do in public/index.php)