モジュールにグローバル変数を保存して、別の関数からアクセスしようとしています。この可変アプリケーション全体が必要なため、$_SESSIONに格納したくありません。以下は私が試しているコードですが、それは単に機能しません。
function popmeup_menu() {
$items['example/feed'] = array(
'title' => 'Example RSS feed',
'page callback' => 'popmeup_page',
'access arguments' => array('access content'),
'type' => MENU_CALLBACK
);
return $items;
}
function popmeup_page() {
print variable_get($xmlt, "");
}
function popmeup_comment_insert($comment) {
variable_set($xmlt,"xmltoreturn");
}