Postingan lainnya
data upload gambar mengunakan codeigniter
script :
$this->load->library('upload', $config); $result = $this->upload->data(); $resp = $this->m_gambar_produk->create_data($params);
if(move_uploaded_file($tmp_file, $config['upload_path']) && $resp['errorCode'] == 200){ $stat = "SUCCESS"; }else{ $stat = "ERROR"; } $count = array($resp); $jsonAr = array( "_meta" => array('status' => $stat,'count' => count($count)), "result" => array('images' => $result) ); json_output($response['errorCode'],$jsonAr);
respon:
"images": { "file_name": "", "file_type": "", "file_path": "./gambar_produk/pp.jpg/", "full_path": "./gambar_produk/pp.jpg/", "raw_name": "", "orig_name": "", "client_name": "", "file_ext": "", "file_size": null, "is_image": false, "image_width": null, "image_height": null, "image_type": "", "image_size_str": "" }
kenapa ada yang kosong ya?
3 Jawaban:
1. pertanyaannya di bikin lebih jelas, lagi bikin apa, yang kosong apa, dst. 2. kodenya ditaro di tag kode gan biar lihatnya enak cek aturan main ya https://sekolahkoding.com/forum/aturan-main terima kasih
iyah baca aturan maen nya gmna ,paste scriptnya
dulu ane pake ini work https://educatecode.com/upload-file-codeigniter/