Skip to content

Instantly share code, notes, and snippets.

@kopiro
Created August 26, 2011 13:15
Show Gist options
  • Save kopiro/1173372 to your computer and use it in GitHub Desktop.
Save kopiro/1173372 to your computer and use it in GitHub Desktop.
Use Joomla Classes in external PHP script
<?php
define( '_JEXEC', 1 );
define( '_VALID_MOS', 1 );
define( 'JPATH_BASE', realpath('.'));
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