$modversion['config'][-]['name'] = 'foo';
global $xoopsModuleConfig; // 仅在函数内需要
echo "当前 'foo' 的值是:" . $xoopsModuleConfig['foo'];
$module_handler =& xoops_gethandler('module');
$module =& $module_handler->getByDirname('bar');
$config_handler =& xoops_gethandler('config');
$moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid'));
echo "当前 'foo' 的值是:" . $moduleConfig['foo'];
|