首页 > 学院 > 开发设计 > 正文

ci 表单验证

2019-11-11 03:52:41
字体:
来源:转载
供稿:网友
//载入验证类$this->load->library('form_validation');//验证是否有输入用户名$this->form_validation->set_rules('username', 'username', 'required');

//验证是否有输入密码

$this->form_validation->set_rules('passWord', 'password', 'required');//启动验证

$status=$this->form_validation->run();

官方手册介绍  : http://codeigniter.org.cn/user_guide/libraries/form_validation.html


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表