可能有一些我错过了。我环顾网络,因此没有任何答案可以帮我解决这个问题。这是我的问题:我在__construct
方法中加载form_validation
库仍然PHP抱怨validation_errors
方法未定义。还有form
助手是自动加载的。Codeigniter validation_errors函数未定义
...
...
function __construct()
{
parent::__construct();
$this->load->library('ion_auth');
$this->load->library('form_validation');
$this->load->helper('url');
....
....
function login()
{
$this->data['title'] = "Login";
.....
.....
//the user is not logging in so display the login page
//set the flash data error message if there is one
$this->data['message'] = (validation_errors()) ? validation_errors() : $this->session->flashdata('message');
上面最后一行出现错误。 (此代码是ion_auth模块http://benedmunds.com/ion_auth/的一部分)
您是否已经运行验证? –
编号页面错误在第一次命中本身。 – nilobarp