I have a few custom PHP functions for my Magento store that I stored in myfunc.php and I need to require it from in a few different .phtml files. How do I do that?
I
First note that
Mage::getBaseDir('skin')
returns only path to skin directory of your Magento install (/your/magento/dir/skin).
You can access absolute path to currently used skin directory using:
Mage::getDesign()->getSkinBaseDir()
This method accepts an associative array as optional parameter to modify result.
Following keys are recognized:
So in your case correct answer would be:
require(Mage::getDesign()->getSkinBaseDir().DS.'myfunc.php');