📜  codeigniter 4 base_url - PHP 代码示例

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

代码示例5
$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;