CodeIgniter可重用的消息库 [英] CodeIgniter reusable message library

查看:106
本文介绍了CodeIgniter可重用的消息库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用消息库( http://codeigniter.com/wiki/Message/ ) )在我的网站上显示错误消息。这是我用来显示消息的代码:

I'm using Message library (http://codeigniter.com/wiki/Message/) to display error messages on my site. This is the code that I'm using to display a message:

$this->message->set('error',$this->config->item('error.login'));

现在我在我的配置文件(config / config.php)每次写信息。有更好的方法吗?配置文件变得非常长。

Right now I'm storing common messages in my config file (config/config.php) instead of writing the message every time. Is there a better way to do it? The config file is getting very long.

我正在寻找的是更好的方式来存储可重用的文本字符串。

What I'm looking for is a better way to store re-usable text strings.

htmlrel =nofollow> CI语言类

CodeIgniter's language class is what you're looking for: CI Language Class

$this->message->set('error',$this->lang->line('error.login'));

这篇关于CodeIgniter可重用的消息库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆