我一直在收到此錯誤註冊引用新的返回值被棄用
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\Config.php on line 80
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\Config.php on line 166
Fatal error: Class 'mysqli_connect' not found in C:\xampp\htdocs\bb2\includes\classes\connection.php on line 3
我不知道爲什麼,這是我的代碼
這是config.php文件
<?php
define("DB_HOST","localhost");
define("DB_USER","root");
define("DB_NAME","beatbeast");
define("DB_PASSWORD","123192");
?>
這是我的連接.php
<?php
require_once('config.php');
$mysqli = new mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
看看相關的問題,以正確的,也有很多類似的問題。 –
首先,你確定你有mysqli包括在PHP中,你的MySQL數據庫是4.1.3或更高? ---試試這個$ mysqli = new mysqli('localhost','my_user','my_password','my_db'); – swapnesh
[Xampp 1.7.4 and PHP 5.3.5(Deprecated warnings)]的可能重複](http://stackoverflow.com/questions/5617605/xampp-1-7-4-and-php-5-3-5-不推薦使用 - 警告) – Amber