Skip to content

Instantly share code, notes, and snippets.

@renorram
Created April 26, 2017 13:39
Show Gist options
  • Save renorram/ff96ad919e3d990a2c5c20dfde04a760 to your computer and use it in GitHub Desktop.
Save renorram/ff96ad919e3d990a2c5c20dfde04a760 to your computer and use it in GitHub Desktop.
minimum for run indiscriminated code in magento
<?php
// Show all errors
ini_set('display_errors', 1);
/**
* Compilation includes configuration file
*/
define('MAGENTO_ROOT', getcwd());
// Include bootstrap file and Mage Class file
require MAGENTO_ROOT . '/app/bootstrap.php';
require_once MAGENTO_ROOT . '/app/Mage.php';
// Set developer mode
Mage::setIsDeveloperMode(true);
umask(0);
$storeId = 1;
// Init magento store
Mage::init($storeId);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment