thinkphp用import引入的文件,没有办法读取
我在一个函数内用import("Common.logAction",APP_PATH,'.php');引入logAction.php文件,这个文件是一个多维数组,结构如下:
$_LANG['log_action']['add'] = '添加';
$_LANG['log_action']['remove'] = '删除';
$_LANG['log_action']['edit'] = '编辑';
$_LANG['log_action']['import'] = '导入';
$_LANG['log_action']['sheng'] = '生成';
$_LANG['log_action']['print'] = '打印';
$_LANG['log_action']['general_ruku'] = '常规入库';
$_LANG['log_action']['sell_chuku'] = '销售出库';
$_LANG['log_action']['check'] = '审核';
$_LANG['log_action']['uncheck'] = '取消审核';
$_LANG['log_action']['batch_check'] = '批量审核';
但是我在函数中却怎么也读取不到引入那个文件的变量值。
function admin_log($sn = '', $action, $content)
{
//日志操作,动作
import("Common.logAction",APP_PATH,'.php');
echo $GLOBALS['_LANG']['log_action'][$action];exit;
}
麻烦各位给点建议。。。