script sql Warning

Peringatan ini problemnya dmna yaa ?

success

Warning: mysqli_query() expects at least 2 parameters, 1 given in F:\xampp\htdocs\ok\media.php on line 15

Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, null given in F:\xampp\htdocs\ok\media.php on line 16

Warning: include(/template.php): failed to open stream: No such file or directory in F:\xampp\htdocs\ok\media.php on line 17

Warning: include(): Failed opening '/template.php' for inclusion (include_path='F:\xampp\php\PEAR') in F:\xampp\htdocs\ok\media.php on line 17

<?php
  ob_start();
  session_start();
  // Panggil semua fungsi yang dibutuhkan (semuanya ada di folder config)
  include "config/koneksi.php" ;
  include "config/fungsi_indotgl.php";
  include "config/class_paging.php";
  include "config/fungsi_combobox.php";
  include "config/library.php";
  include "config/fungsi_autolink.php";
  include "config/fungsi_badword.php";
  include "config/fungsi_kalender.php";

  // Memilih template yang aktif saat ini
  $pilih_template=mysqli_query("SELECT folder FROM templates WHERE aktif='Y'");
  $f=mysqli_fetch_array($pilih_template);
  include "$f[folder]/template.php";
?>

avatar sulistiawan_google
@sulistiawan_google

1 Kontribusi 0 Poin

Diperbarui 4 tahun yang lalu

1 Jawaban:

<div>1. <strong>Warning</strong>: mysqli_query() expects at least 2 parameters, 1 given in <strong>F:\xampp\htdocs\ok\media.php</strong> on line <strong>15 -&gt; mysqli&nbsp;</strong>&nbsp;butuh 2 parameter<br><br></div><pre>$pilih_template=mysqli_query(script koneksi,"SELECT folder FROM templates WHERE aktif='Y'");</pre><div><br>2.&nbsp;<strong>Warning</strong>: mysqli_fetch_array() expects parameter 1 to be mysqli_result, null given in <strong>F:\xampp\htdocs\ok\media.php</strong> on line <strong>16 -&gt;&nbsp;</strong>karena script mysqli_query gagal maka tidak ada hasil / null jadi tampil error<br><br>3.&nbsp;<strong>Warning</strong>: include(/template.php): failed to open stream: No such file or directory in <strong>F:\xampp\htdocs\ok\media.php</strong> on line <strong>17 -&gt;&nbsp;</strong>script $f[folder] itu null, tidak ada file / folder di null/template.php, gunakan base_url() atau tulis lokasi penyimpanan agar file dpat diketahui oleh sistem</div><pre>include "$f[folder]/template.php";</pre><div><br>4. Masalah harusnya sudah selesai jika warning ke-3 sudah benar<strong><br></strong><br></div>

avatar jeffian
@jeffian

26 Kontribusi 17 Poin

Dipost 4 tahun yang lalu

Login untuk ikut Jawaban