Hallo! Selamat Datang di Marketplace produk digital, Freelancer terbaik di indonesia (68414 Members, 793 Products, 5353 Topic, 13045 Comments)

masukan foto ke database

Dibuat
Login Terakhir 3 Bulan lalu,
Telah Dilihat 1384 Kali
CANDI PURNOMO Mengatakan : Sultan Account
  1. Assalamualaikum Warahmatullahi Wabarakatuh...
  2.  
  3. salahnya dimana mohon solusinya
  4. A PHP Error was encountered
  5. Severity: Notice
  6.  
  7. Message: Undefined index: gambar
  8.  
  9. Filename: admin/data_barang.php
  10.  
  11. Line Number: 22
  12.  
  13. Backtrace:
  14.  
  15. File: E:\xampp\htdocs\toko_online\application\controllers\admin\data_barang.php
  16. Line: 22
  17. Function: _error_handler
  18.  
  19. File: E:\xampp\htdocs\toko_online\index.php
  20. Line: 315
  21. Function: require_once
  22. =====================================================================
  23. A PHP Error was encountered
  24. Severity: Notice
  25.  
  26. Message: Undefined property: Data_barang::$upload
  27.  
  28. Filename: admin/data_barang.php
  29.  
  30. Line Number: 29
  31.  
  32. Backtrace:
  33.  
  34. File: E:\xampp\htdocs\toko_online\application\controllers\admin\data_barang.php
  35. Line: 29
  36. Function: _error_handler
  37.  
  38. File: E:\xampp\htdocs\toko_online\index.php
  39. Line: 315
  40. Function: require_once
  41. =====================================================================
  42. Fatal error: Call to a member function do_upload() on null in E:\xampp\htdocs\toko_online\application\controllers\admin\data_barang.php on line 29
  43. A PHP Error was encountered
  44. Severity: Error
  45.  
  46. Message: Call to a member function do_upload() on null
  47.  
  48. Filename: admin/data_barang.php
  49.  
  50. Line Number: 29
  51.  
  52. Backtrace:
Ada 1 File Kiriman :
1. Screenshot_(2)2.png (164 KB)

Ada 1 Jawaban

Bukhori Muslim
commented on 26 Nov 2019 06:15:40
  1. Assalamualaikum,.. cek lagi fungsi uploadnya, masalahnya disana,
  2. contoh config yang benar unutk upload file :
  3. $config['upload_path'] = 'folder_file_upload/';
  4. $config['allowed_types'] = 'gif|jpg|png';
  5. $config['max_size'] = '10000'; // kb
  6. $this->load->library('upload', $config);
  7. $this->upload->do_upload('input_name');
  8. $hasil=$this->upload->data();
  9.  
  10. echo $hasil['file_name'];
Maaf, Untuk Memberikan Komentar Anda Harus Login !!!

Online