Home  >  Article  >  Backend Development  >  thinkphp model证验不得行

thinkphp model证验不得行

WBOY
WBOYOriginal
2016-06-13 11:10:25908browse

thinkphp model验证不得行

thinkphp model 验证没没有结果
得不到我验证条件数组
这个是啥原因哟?

我在thinkphp model里 
protected $_validate       = array();  // 在这一行写上

手写一个条件就可以得到值
但是在具体的model比如UserModel里面写验证条件就得不到值

你们遇到过嘛。
我的问题就是 thinkphp model验证不得行


------解决方案--------------------
首先确认 你是用  D 还是用 M 去调用的
D("")->create();
------解决方案--------------------
手册上示例用 D 你为何别出心裁的用 M
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn