これは古い質問であることは知っていますが、誰かがまだ探している場合に備えて、ここに解決策を投稿することにしました。
Joomla は独自のフレームワークとセッション管理を使用します。独自の php ファイルを作成して、Joomla セッション変数にアクセスすることは引き続き可能です。joomla フレームワークを php スクリプトにロードするだけです。
J1.6 の場合、php スクリプトの先頭に次の行を含める必要があります。注: joomla が session_start() を呼び出すため、これらを一番上に含める必要があります。
define( '_JEXEC', 1 );
define( 'JPATH_BASE', realpath(dirname(__FILE__).'/..' )); //you will need to update this path to represent your installation. This path works if you store all your custom php scripts in a subdirectory off the main joomla install directory.
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();
これを行うと、次を使用してセッション変数を保存できます。
$session->set('msgjson',$msgjson);
以下を使用してセッション変数を読み取ります。
$msgjson = $session->get('msgjson')
以下を使用してセッション変数の設定を解除します。
$session->clear('msgjson');
これは J1.6 で機能します。おそらく、他のバージョンの joomla フレームワークをロードする行を変更する必要があります。フレームワークをロードする必要があるため、Joomla のルート ディレクトリにある index.php から始めます。
これが役立つことを願っています。