Welcome Guest, Not a member yet? Register   Sign In
CI4 Multiple app and env file
#1
Lightbulb 

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
Reply
#2

Is correctly if I add before class initialization : 
PHP Code:
if (file_exists(APPPATH 'Config/' ENVIRONMENT '/namefile.php'))
{
    require 
APPPATH 'Config/' ENVIRONMENT '/namefile.php';
} else { ... } 

? thanks...
Reply




Theme © iAndrew 2016 - Forum software by © MyBB