Created
June 7, 2016 06:21
-
-
Save 0ex-d/1da2bc0eaaf2cbc6e1e40e0c3e15f43b to your computer and use it in GitHub Desktop.
Import Joomla to your MVC for some reasons
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Swiftly: Import Joomla for some reasons | |
* N.B: Our 'JPATH_BASE' is not in same dir | |
* June 05, 2016 | |
*/ | |
if (!defined('_JEXEC')) { | |
define( '_JEXEC', 1 ); | |
define( 'JPATH_BASE', realpath(dirname(__FILE__)) ); | |
define( 'DS', DIRECTORY_SEPARATOR ); | |
} | |
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' ); | |
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' ); | |
$mainframe =& JFactory::getApplication('site'); | |
$mainframe->initialise(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment