環境変数 HTTPS の on, off を取得できない?
状態:不明
閲覧数:3,806
投稿日:2010-03-27
更新日:2010-08-08
▼設置サポート | PHP Labo
http://www.php-labo.net/info/support/view/3#article_4
Xrea.com さんのサーバでは、環境変数 HTTPS の on, off を取得できないようです。
というわけで、index.phpの
function session()の部分を
/*変更前*********************************/
if (isset($_SERVER['HTTPS']) and $_SERVER['HTTPS'] != 'off') {
$info = parse_url(HTTPS_PATH);
} else {
$info = parse_url(HTTP_PATH);
}
/*変更後*********************************/
if (isset($_SERVER['HTTP_VIA']) and $_SERVER['HTTP_VIA'] != 'off') {
$info = parse_url(HTTPS_PATH);
} else {
$info = parse_url(HTTP_PATH);
http://www.php-labo.net/info/support/view/3#article_4
Xrea.com さんのサーバでは、環境変数 HTTPS の on, off を取得できないようです。
というわけで、index.phpの
function session()の部分を
/*変更前*********************************/
if (isset($_SERVER['HTTPS']) and $_SERVER['HTTPS'] != 'off') {
$info = parse_url(HTTPS_PATH);
} else {
$info = parse_url(HTTP_PATH);
}
/*変更後*********************************/
if (isset($_SERVER['HTTP_VIA']) and $_SERVER['HTTP_VIA'] != 'off') {
$info = parse_url(HTTPS_PATH);
} else {
$info = parse_url(HTTP_PATH);