老师在不
$title = trim(input('post.title'));
$site = $this->db->table('sites')->where(array('names'=>'site'))->item();
if(!$site){
$this->db->table('sites')->insert(array('names'=>'site','values'=>json_encode($title)));
}else{
$value['values'] = json_encode($title);
$this->db->table('sites')->where(array('names'=>'site'))->update($value);
}
Copyright 2014-2024 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
你得看看报什么错 对症下***