Postingan lainnya
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";
?>
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 -> mysqli </strong> butuh 2 parameter<br><br></div><pre>$pilih_template=mysqli_query(script koneksi,"SELECT folder FROM templates WHERE aktif='Y'");</pre><div><br>2. <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 -> </strong>karena script mysqli_query gagal maka tidak ada hasil / null jadi tampil error<br><br>3. <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 -> </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>