我注意到一个奇怪的问题,我似乎找不到任何东西来解释它。
在我的一个模型上,我添加了一条错误输出消息,以警告记录不可用,但当它输出时,我没有得到任何文本,只得到一个空白页面。
现在语言标签是有效的,我唯一能理解的是,语言文件并不是用在模型上的,如果这就是我看不到的任何地方的解释。
我希望有人能帮助我在这方面获得正确的方向,如果我必须将其设置为false并在ui上处理消息,我会这样做,但我不希望这样做。
谢谢。
编辑:
下面是一个应该会有帮助的快速代码片段:
//fetch topic data.
$this->db->select('id, Name, Description, Level');
$this->db->from('groups');
$this->db->where('id', $gid);
$query = $this->db->get();
$GroupData = $query->row();
//see if we have any records to show.
if($query->num_rows() > 0) {
$this->setId($GroupData->id);
$this->setName($GroupData->Name);
$this->setDescription($GroupData->Description);
$this->setLevel($GroupData->Level);
} else {
//no record was found, throw an error.
show_error($this->lang->line('invalidgid').'<hr />File:'.__FILE__.'<br />Line:'.__LINE__, 500, $this->lang->line('error'));
log_message('error', 'invalid GroupID was provided.'); //log error in error log.
}
发布于 2012-04-13 10:54:42
我觉得自己很傻,但是我想通了,语言文件在那个时候还没有加载,啊!
我将不得不回到这个绘图板上,它看起来,任何建议,请张贴。
https://stackoverflow.com/questions/10116225
复制相似问题