• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CI4 Multiple app and env file

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...

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.