嗨im試圖從mysql更改爲mysqli和ive使用了一個編輯器,它將所有更改並即時通訊更改所有文件後出現以下錯誤 致命錯誤:調用成員函數query()非對象/home/matureco/public_html/config/db_connect.php第7行從mysql更改爲mysqli後出現錯誤
繼承人的一塊編碼爲
$conn = new mysqli(DBHOST,DBUSER,DBPASS) or die($mysqli->error);
$row = mysqli_fetch_array($mysqli->query("select * from settings where id = '1' "));
$site_name = trim(stripslashes($row['site_name']));
$email = trim($row['email']);
$keyword = trim(stripslashes($row['keyword']));
$description= trim(stripslashes($row['description']));
$logo = trim($row['logo']);
$copyright = trim(stripslashes($row['copyright']));
$favicon = trim($row['favicon']);
$paypal_email = trim($row['paypal_email']);
誰能告訴我是什麼香港專業教育學院錯過
非常感謝ty jan x
'mysqli(DBHOST,DBUSER,DBPASS)'這裏缺少什麼?我會讓你考慮一下。編輯:哦和錯誤的變量。 http://php.net/manual/en/function.mysqli-connect.php --- http://php.net/manual/en/mysqli.error.php –