0
我不知道我在这里做错了,但似乎无法更新图像路径db。无法在Codeigniter中插入图像路径到db
我试图打印$图像我控制器和模型,工作正常,但当我看着数据库它插入单词'图像'。
型号:
function update_profile_image($image, $id){
$this->db->set('profile_thumb', $image);
$this->db->where('property_ref_id', $id);
$this->db->update('vbc_property_images');
}
控制器:
function property_profile_image_update() {
$id = $this->uri->segment(3);
$image = $this->uri->segment(4);
$this->my_listings_model->update_profile_image($id, $image);
$this->load->view('property-profile-image-update');
}
网址为:
http://localhost/admin/dashboard/property-profile-image-update/1/property_image_1.jpg
对不起,没有运气..是否有可能becoz我有不同的行像image1.jpg,image2.jpg,image3.jpg ...但是,如果它打印为个人像image2.jpg那么不应该是这样的,是吗? –