通过判断http或https

 

      if($_SERVER['REQUEST_SCHEME']=='http'){
            return true;
        }else{
            return false;
        }

 

https网站使用

<script type="text/javascript" src="https://api.map.baidu.com/api?v=3.0&ak=您的密钥&s=1">

http使用

<script type="text/javascript" src="http://api.map.baidu.com/api?v=3.0&ak=您的密钥">

 

相关文章:

  • 2021-06-24
  • 2022-01-13
  • 2021-08-30
  • 2021-09-01
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-19
  • 2021-11-06
相关资源
相似解决方案