CodeIgniter Forums

Full Version: CI4 Multiple app and env file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, i'm porting my ci3 app to ci4.
My app is multiple app, on ci4 i have make two app directory (config/controllers...) and two public app (index.php, .htaccess), i have modified index.php for load correctly Config/Paths, in this image my folder structure:

[Image: 8Ybw7X.png]

My problem is configuration files for different environment, in ci3 i have make two directory for env (production/development) in ci4 i have env file but in project root, I can moving env file in app directory from project root ?

Thank for attention and sorry for my bad english  Smile
Is correctly if I add before class initialization : 
PHP Code:
if (file_exists(APPPATH 'Config/' ENVIRONMENT '/namefile.php'))
APPPATH 'Config/' ENVIRONMENT '/namefile.php';
} else { ... } 

? thanks...