Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How did the mage class gets loaded in mage::run() in index.php? 
 
OurWorldTalks
Member
 
Total Posts:  60
Joined:  2008-07-08
 

Hi magento experts… i guess this is a simple question, but I’ve looked through .htaccess and index.php. There is this statement mage::run() in there at line 40. I’m thinking that mage should be a class, run is a function of the class.... but I DONT SEE anywhere in index.php that loads the mage class. Where is it?

I found the class mage and function run in mage.php, but how did mage.php gets loaded in index.php?

(Sorry, I’m no programmer, just someone who knows a tiny little bit)
Thanks for the help.

 
Magento Community Magento Community
Magento Community
Magento Community
 
crius
Guru
 
Avatar
Total Posts:  623
Joined:  2007-10-16
Denmark
 

index.php:

...
$mageFilename 'app/Mage.php';
...
require_once 
$mageFilename;
...
 
Magento Community Magento Community
Magento Community
Magento Community
 
OurWorldTalks
Member
 
Total Posts:  60
Joined:  2008-07-08
 

OMG i missed out that line! i gotta take a rest.
Thank you vm.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top