Last active
October 12, 2015 18:32
-
-
Save sarfraznawaz2005/0b5ddc65a56d4c6f19e9 to your computer and use it in GitHub Desktop.
Accessing Joomla Framework Outside of Joomla
This file contains hidden or 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 | |
// include the following at the top of your script | |
define( '_JEXEC', 1 ); | |
define('JPATH_BASE', dirname(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'); | |
//From there you can do normal development as if you were inside of Joomla's framework |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment