用户登录后,我正在使用此功能重定向到投资组合...
function redirect($destination)
{
//handle url
if (preg_match("/^https?:\/\//", $destination))
{
header("Location: " . $destination);
}
// handle absolute path
else if (preg_match("/^\//", $destination))
{
$protocol = (isset($_SERVER["HTTPS"])) ? "https" : "http";
$host = $_SERVER["HTTP_HOST"];
header("Location: $protocol://$host$destination");
}
// handle relative path
else
{
// adapted from http://www.php.net/header
$protocol = (isset($_SERVER["HTTPS"])) ? "https" : "http";
$host = $_SERVER["HTTP_HOST"];
$path = rtrim(dirname($_SERVER["PHP_SELF"]), "/\\");
header("Location: $protocol://$host$path/$destination");
}
// exit immediately since we're redirecting anyway
exit;
}
使用它会在 chrome 中产生 SSL 连接错误:错误 107 (net::ERR_SSL_PROTOCOL_ERROR): SSL 协议错误。在 firefox 连接到 localhost:63077 时出错。
SSL received a record that exceeded the maximum permissible length.
(错误代码:ssl_error_rx_record_too_long
请不要告诉我问题...告诉我解决方案或替代方案 我有一个 Windows azure 帐户...它甚至无法在那里工作... 亲切问候 Vishal
PS:我知道这会花费很多时间..我的想象杯项目真的需要这个..