Magento Base URL

When developing in Magento and playing arround with Magento Themes there is some functions you should know.

If you want to get the source url of an image, javascript or file, call one of this functions adding your own path at the end.

Under every function there is an example of the output value:

http://example.com/

<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); ?>

http://example.com/js/

<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS); ?>

http://example.com/index.php/

<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK); ?>

http://example.com/media/

<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA); ?>

http://example.com/skin/

<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN); ?>

Thanks to Thamu