I want to use magento header and footer files(custom theme) in my custom php file. How can I get header and footer. php file location is root folder.
I am using this code
require("app/Mage.php");
umask(0);
Mage::app();
ini_set('display_errors', 1);
Mage::getSingleton('core/session', array('name' => 'frontend'));
$session = Mage::getSingleton("customer/session");
$layout = Mage::getSingleton('core/layout');
$headerBlock = $layout->createBlock('page/html_header')->setTemplate('page/html/header.phtml');
$currencyBlock = $layout->createBlock('directory/currency')->setTemplate('currency/currency.phtml');
$headerBlock->setChild('currency_selector', $currencyBlock);
echo $headerBlock = $headerBlock->toHtml();