The main important or you can say life of magento is Mage.php, we need to access Mage.php because It holds the Mage class and defines some of the root functionality of Magento like retrieving the model, setting up the BaseUrl path and calling the rest of the
Create one file called test.php and and add the below code
For Accsssing the Customer login Session we can use
Mage::getSingleton(‘core/session’, array(‘name’ => ‘frontend’));
$session = Mage::getSingleton(‘customer/session’);
Hope You this will help you!