时间:2021-07-01 10:21:17 帮助过:43人阅读
function PMA_getenv($var_name) { if (isset ( $_SERVER [$var_name] )) { return $_SERVER [$var_name]; } elseif (isset ( $_ENV [$var_name] )) { return $_ENV [$var_name]; } elseif (getenv ( $var_name )) { return getenv ( $var_name ); } elseif (function_exists ( 'apache_getenv' ) && apache_getenv ( $var_name, true )) { return apache_getenv ( $var_name, true ); } return ''; } if (empty ( $HTTP_HOST )) { if (PMA_getenv ( 'HTTP_HOST' )) { $HTTP_HOST = PMA_getenv ( 'HTTP_HOST' ); } else { $HTTP_HOST = ''; } } //echo htmlspecialchars($HTTP_HOST );