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

thinkphp create false求解解决方法

WBOY
Release: 2016-06-13 11:52:12
Original
1150 people have browsed it

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 />
Copy after login

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

数据库

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template