且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何检查用户名是否已经存在于codeigniter中

更新时间:2023-11-25 21:48:04

您的问题在set_rules行。这里使用 is_unique 回调函数。你必须使用任何人。如果使用call_back函数检查重复数据;不需要使用is_unique。 对于这个错误你得到那个错误只要从那里删除 is_unique

Your problem is in the set_rules line. Here you use both is_unique and a callback function. You have to use anyone of that. If you use a call_back function to check duplicate data; doesn't need to use is_unique. For this wrong you get that error Just remove the is_unique from there.

$this->form_validation->set_rules('email','Email','trim|required|valid_email|callback_isEmailExist'); // removed is_unique

尝试一下,让我知道。