Internet Explorer http referer issue

前端 未结 6 912
孤独总比滥情好
孤独总比滥情好 2020-12-06 03:26

it seems I have run into a problem with Internet Explorer 7. I have an html page that has links to files on another server. The server I am linking to checks the referrer of

6条回答
  •  星月不相逢
    2020-12-06 03:47

    I have resolved it, include this code in all pages of your project

    session_start();
    if($_SERVER['SERVER_PORT'] == 443 )
        $http = 'https://';
    else
        $http = 'http://';
    
    $adress = $http.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];  
    
    $_SESSION['referer'] = $_SESSION['current_page'];
    $_SESSION['current_page'] = $adress;
    $_SERVER['HTTP_REFERER'] = $_SESSION['referer'];
    

提交回复
热议问题