• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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