Welcome Guest, Not a member yet? Register   Sign In
order of config files
#1

On CI3. The order is application/config then application/config/environment. So environment dependent code can be placed on environment

How about CI4 ?

I want to put :

PHP Code:
$hostName $_SERVER['HTTP_HOST'];
if(empty(
$_SERVER['HTTPS'])){
    
$this->baseURL "http://$hostName";
}else{
    
$this->baseURL "https://$hostName";
 
so my app can adapt when accessed from actual host and domain alias (no redirection so they look as different site for visitor).
Also cookie domain needs to change.

So where do i put? application/Config/App.php, .env, bootstrap ?
Apso APPPATH not work on .env
Reply




Theme © iAndrew 2016 - Forum software by © MyBB