Run a Magento Code out of installation folder

0 votes
284 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 248 views
+1 vote
1 answer 409 views
0 votes
1 answer 15 views
+1 vote
1 answer 41 views
0 votes
1 answer 74 views
+2 votes
0 answers 120 views
...