📜  动态基础 url codeigniter - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:44.175000             🧑  作者: Mango

代码示例4
$base_url = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http");
$base_url .= "://". @$_SERVER['HTTP_HOST'];
$base_url .=     str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
$config['base_url'] = $base_url;