我在 Joomla 2.5.16 上,我想要当前的用户 ID 和组 ID。
下面的代码返回一个空白页,为什么?
<?php
include_once $_SERVER['DOCUMENT_ROOT']."/includes/defines.php";
include_once $_SERVER['DOCUMENT_ROOT']."/includes/framework.php";
$user = JFactory::getUser();
$group_id = &JFactory::group_id();
$user_id = $user->get('id');
echo $user_id;
echo $group_id;
?>