在 php 代码中引用语言资源失败。
如题,在代码中引用语言资源失败, $lang->project->delayed 得到的是空串。而在页面中 echo 输出时是正常的。
foreach($psprojects as $id => $project)
{
$delay = helper::diffDate(helper::today(), $project->projectend);
if($delay>0)
{
$this->app->loadLang('project');
$psprojects[$id]->projectstatus = $lang->project->delayed . '(' . $delay . ')';
//$psprojects[$id]->projectstatus = '已延期' . '(' . $delay . ')';
}
else
{
$psprojects[$id]->projectstatus = zget($lang->project->statusList, $project->projectstatus);
}
}
$this->app->loadLang('project'); $this->lang->project->**** 看下呢?