I would like to try some code snippets (about to make a script) which uses Magento’s models and classes.
The problem is that I get the following error:
fdr@fderose-gtrade:/var/www/globaltrade$
fdr@fderose-gtrade:/var/www/globaltrade$ php -a
Interactive shell
php > require './app/Mage.php';
Fatal error: Class 'Mage' not found in /var/www/globaltrade/app/Mage.php on line 31
Line 31 of Mage.php is the following:
Mage::register('original_include_path', get_include_path());
Does anybody have an idea about what could be the cause? Thank you!
According to php.net
see http://php.net/manual/en/features.commandline.interactive.php for more info (its a note towards the bottom of the description)