Created
June 3, 2013 06:36
-
-
Save rajvanshipradeep15/5696434 to your computer and use it in GitHub Desktop.
joomla: include jfactory class in external php file
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
Include Jfactory class in external php file | |
define( '_JEXEC', 1 ); | |
define( 'DS', DIRECTORY_SEPARATOR ); | |
define( 'JPATH_BASE', $_SERVER[ 'DOCUMENT_ROOT' ] ); | |
... then you need to include three files, like: | |
require_once( JPATH_BASE . DS . 'includes' . DS . 'defines.php' ); | |
require_once( JPATH_BASE . DS . 'includes' . DS . 'framework.php' ); | |
require_once( JPATH_BASE . DS . 'libraries' . DS . 'joomla' . DS . 'factory.php' ); | |
$mainframe =& JFactory::getApplication('site'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment