drush
V2EX  ›  PHP

$_SERVER['HTTPS'] not work

  •  
  •   drush · May 3, 2013 · 4543 views
    This topic created in 4824 days ago, the information mentioned may be changed or developed.
    我用 https://abc.com 访问

    code 里用


    if ( isset( $_SERVER["HTTPS"] ) && strtolower( $_SERVER["HTTPS"] ) == "on" ) {
    echo 'SSSSSSSSSSSSSSSSSSSSSSSSS';
    }
    else{
    echo 'NNNNNNNNNNNNNNNNNNNNNNNNN';
    }


    判断。。但无论是不是https,都会返回 NNNNNNNNNN

    求教那里出问题。。。
    5 replies    1970-01-01 08:00:00 +08:00
    feijilei
        1
    feijilei  
       May 3, 2013   ❤️ 1
    一句句调试下
    jasontse
        2
    jasontse  
       May 3, 2013 via iPad   ❤️ 1
    nginx?fastcgi_params里有定义HTTPS吗
    drush
        3
    drush  
    OP
       May 3, 2013
    @feijilei 貌似这应该是关apache or php的 配置问题,跟code 无关吧。


    @jasontse 我用的是apache 那里要不要做什么特别配置?
    jasontse
        4
    jasontse  
       May 3, 2013 via iPad
    @drush 是mod_php还是fastcgi
    drush
        5
    drush  
    OP
       May 3, 2013
    @jasontse 好吧,原来是it 那边,将域名无论443还是80端口的都给我转到80那里,再次感谢
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1031 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 19:08 · PVG 03:08 · LAX 12:08 · JFK 15:08
    ♥ Do have faith in what you're doing.