篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php 获取当前url皮肤url base url get request相关的知识,希望对你有一定的参考价值。
$this->getRequest()
$this->getRequest()->getActionName()
$currenturl = $this->helper('core/url')->getCurrentUrl();
strpos($currenturl, 'catalogsearch/advanced');
<?php
$currenturl = $this->helper('core/url')->getCurrentUrl();
if(strpos($currenturl, 'checkout/cart')):
?>
Get Magento Store Url
http://example.com/
<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); ?>
Get Magento Skin Url
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);
or you can write
$this->getSkinUrl();
calling skin url out side magento
Mage::getDesign()->getSkinUrl()
e.g:- http://yoursite.com/skin/
Get Magento Media Url
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
e.g:- http://yoursite.com/media/
Get Magento Js Url
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_Js);
or you can write
$this->getJsUrl();
e.g:- http://yoursite.com/js/
以上是关于php 获取当前url皮肤url base url get request的主要内容,如果未能解决你的问题,请参考以下文章