Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Mysql ir mysqli

Parašė MindaugasL· 2018 Vas. 18 23:02:42
#1

Sveiki,meta tokius error maincore.php faile

PHP Notice:  Undefined variable: mysql_hostname in /home/heatfmlt/public_html/maincore.php on line 8
[18-Feb-2018 21:57:46 UTC] <span style="border-bottom: 1px dotted black;">PHP</span> Notice:  Undefined variable: mysql_username in /home/heatfmlt/public_html/maincore.php on line 8
[18-Feb-2018 21:57:46 UTC] <span style="border-bottom: 1px dotted black;">PHP</span> Warning:  mysqli_connect(): (28000/1045): Access denied for user 'root'@'localhost' (using password: NO) in /home/heatfmlt/public_html/maincore.php on line 8
[18-Feb-2018 21:57:46 UTC] <span style="border-bottom: 1px dotted black;">PHP</span> Notice:  Undefined variable: heatfmlt_muzika in /home/heatfmlt/public_html/maincore.php on line 9
[18-Feb-2018 21:57:46 UTC] <span style="border-bottom: 1px dotted black;">PHP</span> Warning:  mysqli_select_db() expects exactly 2 parameters, 1 given in /home/heatfmlt/public_html/maincore.php on line 9
[18-Feb-2018 21:57:46 UTC] <span style="border-bottom: 1px dotted black;">PHP</span> Warning:  mysqli_query() expects at least 2 parameters, 1 given in /home/heatfmlt/public_html/maincore.php on line 10


Kur ieškoti bėdos?

Redagavo MindaugasL· 2018 Vas. 19 00:02:58

Parašė WhiZz· 2018 Vas. 26 17:02:01
#2

$mysql_hostname, $mysql_hostname ir $heatfmlt_muzika - Neegzistuoja arba nerasti. Va tavo klaida.
Sprendimas:
1. Jeigu tie kintamieji yra ne maincore.php, o kitam faile, maincore.php virsuj irasyk require_once('failas_su_kintamaisiais.php);
2. Jeigu cia funkcija... funkcijos viruj irasyk: global $mysql_hostname, $mysql_hostname, $heatfmlt_muzika;