Run a Magento Code out of installation folder

0 votes
573 views
asked Jun 22, 2016 in Magento by Annabelle
How can we run Magento Code Externally on another folder other than its default installation folder please?

1 Answer

0 votes
answered Jun 29, 2016 by Narayanan

Simple as this.

<?php
require_once('app/Mage.php'); //Path to Magento
umask(0);
Mage::app();
// Run you code here
?>

Related questions

+2 votes
1 answer 382 views
+1 vote
1 answer 534 views
0 votes
1 answer 1356 views
+1 vote
1 answer 1237 views
0 votes
1 answer 721 views
asked Feb 14, 2017 in Magento by Toms
+2 votes
0 answers 339 views
...