THINKPHP数据提交问题
提交之后在表里找结果,发现只有字段title里面有数据,其他的都是空的。
html:
class:
function add() {
$Form = D("Form");
if($Form->create()) {
$Form->add();
$this->redirect();
}else{
header("Content-Type:text/html; charset=utf-8");
exit($Form->getError().' [
返 回 ]');
}
}
------解决方案--------------------
你的html name和表的字段名一样,字段影射除外,修改过数据库后,把runtime文件夹删掉。
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