#1 phpfans
今天将数据库改为sqlite3,pdo方式,读取数据正常,但是无法写入数据,开始以为代码问题,切换回MYSQL测试添加数据可以正常写入,检查sqlite数据库的目录权限也为可写入状态,数据库使用 SQLite Developer创建,以前自己写代码操作没有出现过类似问题,请问是什么原因?添加数据的代码
function post(){
$types = spClass("lib_class");
$this->type =$types->typelist();
if($title = $this->spArgs("title")){
$addnews = spClass("lib_news");
$newrow = array(
'title' => $this->spArgs('title'),
'classid' => $this->spArgs('classid'),
'content' => $this->spArgs('content'),
);
$addnews->create($newrow);
$this->success("发布成功!", spUrl("admin","post"));
}
}
2011-10-09 21:58:02