Home >Backend Development >PHP Tutorial >thinkphp create false求解解决方法

thinkphp create false求解解决方法

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 11:52:121152browse

thinkphp create false求解
如题,以下是我的代码

<br />class TestAction extends Action{ <br />	public function index()<br />	{<br />		$test = D('Test');<br />		var_dump($test->create());<br />    }<br />} <br />

<br />class TestModel extends Model{<br />    protected $_validate=array(<br />        array('title','','名字必填哦!','1'),<br />        array('content','','帐号名称已经存在!',0,'unique',1),<br />    );<br />}<br />

数据库

------解决方案--------------------
你是要判断数据是否有值吗
?

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