I need to assign $config[\'base_url\'] dynamically in config.php every time when url hits.
$config[\'base_url\']
config.php
Is there any solution for this?
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'];