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?

avatar abdulrojakUG
@abdulrojakUG

59 Kontribusi 0 Poin

Diperbarui 6 tahun yang lalu

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

avatar hilmanski
@hilmanski

2672 Kontribusi 2132 Poin

Dipost 6 tahun yang lalu

iyah baca aturan maen nya gmna ,paste scriptnya

dulu ane pake ini work https://educatecode.com/upload-file-codeigniter/

avatar educatecode
@educatecode

3 Kontribusi 0 Poin

Dipost 6 tahun yang lalu

ini contoh atau nanya error?

avatar Anadrep
@Anadrep

16 Kontribusi 3 Poin

Dipost 6 tahun yang lalu

Login untuk ikut Jawaban