56. magento 判断 https or http

来源:互联网 发布:mysql中替换字符串 编辑:程序博客网 时间:2024/06/08 11:05

1. PHP 原生方法

$_SERVER['REQUEST_SCHEME']

2. Magento 的方法

$isSecure = Mage::app()->getStore()->isCurrentlySecure();($isSecure) ? 'https' : 'http' ;

这里写图片描述


http://stackoverflow.com/questions/3457987/can-i-check-for-https-in-magento-phtml-files

0 0
原创粉丝点击