header('Content-Type: text/javascript; charset=utf-8'); die("/*null*/"); } $id = $pmxProj->getIDbySlatID($saltid); $detail = $pmxProj->getDetail($id); $mods = json_decode($detail['mods'], true); if ($detail['status'] == 0) { header('Content-Type: text/javascript; charset=utf-8'); die("/*null*/"); } $code = $pmxProj->getCode($id); if (count($mods) == 1 && strpos($code, "{pmx.system.module.")) { // 判断是否为系统模块 $mod_httpauth_id = 34; $mod_srcredirection_id = 31; $mod_config = $pmxProj->getConfig($id); if (strpos($code, "{pmx.system.module.httpauth}")) { $info = ""; if (count($mod_config) > 0) { foreach ($mod_config as $mod_config_item) { if ($mod_config_item[0] == $mod_httpauth_id && $mod_config_item[1] == "info") { $info = $mod_config_item[2]; break; } } } header('WWW-Authenticate: Basic realm="' . $info . '"'); $username = isset($_SERVER['PHP_AUTH_USER']) ? $_SERVER['PHP_AUTH_USER'] : ""; $password = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : ""; $url = (new pmxURL())->get_request_puburl($saltid) . "?PHP_AUTH_USER="******"&PHP_AUTH_PW=" . urlencode($password); // echo $url;