Need to assign dynamically $config['base_url'] in codeigniter?

后端 未结 1 1393
半阙折子戏
半阙折子戏 2021-01-25 18:26

I need to assign $config[\'base_url\'] dynamically in config.php every time when url hits.

Is there any solution for this?

相关标签:
1条回答
  • 2021-01-25 18:49

    Usually, we are using $config['base_url'] to store domain name. Why you need to store this on every refresh?. If you want to make it dynamic on different domains. Try bellow one

     $config['base_url']=$_SERVER['SERVER_NAME'];
    
    0 讨论(0)
提交回复
热议问题