Skip to content

Instantly share code, notes, and snippets.

@fidlerryan
Created May 20, 2015 15:13
Show Gist options
  • Save fidlerryan/e94f2225c6aa4866fd61 to your computer and use it in GitHub Desktop.
Save fidlerryan/e94f2225c6aa4866fd61 to your computer and use it in GitHub Desktop.
Accessing the Joomla Framework via an AJAX Call
define( '_JEXEC', 1 );
define( ' _VALID_MOS', 1 );
define( 'JPATH_BASE', '/path/to/Joomla/installation');
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