Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要在每次 url 命中时$config['base_url']动态分配。config.php
$config['base_url']
config.php
有什么解决办法吗?
通常,我们使用 $config['base_url'] 来存储域名。为什么你需要在每次刷新时存储它?如果你想让它在不同的域上动态。试试下面的一个
$config['base_url']=$_SERVER['SERVER_NAME'];