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那麼不應該是這樣的,是嗎? –