php-mvc icon indicating copy to clipboard operation
php-mvc copied to clipboard

Accessing App\Config from public dir

Open pf-tech opened this issue 3 years ago • 1 comments

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!

pf-tech avatar Mar 11 '22 20:03 pf-tech

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

daveh avatar Mar 12 '22 14:03 daveh