2011-06-28 67 views
0

可能重複:
Accessing session data outside Joomla檢索Joomla的會議在外部PHP

我嘗試使用下面的腳本來檢索Joomla的會議,但它不工作。 誰能幫我...

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'); 
$session  = &JFactory::getSession(); 

回答

0

這是我使用:

//Joomla Stuff 
    define('_JEXEC', '1'); 
    define('JPATH_BASE', 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'); 

    /** 
    * INITIALISE THE APPLICATION 
    * 
    * NOTE : 
    */ 
    // set the language 
    $mainframe->initialise(); 

    JPluginHelper::importPlugin('system'); 

    // trigger the onAfterInitialise events 
    JDEBUG ? $_PROFILER->mark('afterInitialise') : null; 
    $mainframe->triggerEvent('onAfterInitialise'); 
    // End Joomla Stuff 
+0

我想這也還是它不工作.... 請幫助我,這是迫切.. – Prasad007

+0

如果還有其他方法可以完成這個任務.Plz告訴我...... – Prasad007