Để sử dụng thư viện joomla, bạn sử dụng đoạn code sau:
<?php /* Initialize Joomla framework */ define( '_JEXEC', 1 ); define('JPATH_BASE', dirname(__FILE__) ); define( 'DS', DIRECTORY_SEPARATOR ); /* Required Files */ require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' ); require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' ); /* To use Joomla's Database Class */ require_once( JPATH_BASE .DS.'libraries'.DS.'joomla'. DS.'factory.php' ); /* Create the Application */ $mainframe =& JFactory::getApplication('site'); /**************************************************/ // Your code starts here... /**************************************************/
?>
|
|
Comments
RSS feed for comments to this post