最近中文字幕高清中文字幕无,亚洲欧美高清一区二区三区,一本色道无码道dvd在线观看 ,一个人看的www免费高清中文字幕

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

數(shù)據(jù)庫連接失敗....

$link = mysql_connect('127.0.0.1', 'root', 'root','3307') or die('數(shù)據(jù)庫連接失敗');

mysql_select_db('phpdata');//選擇一個(gè)需要操作的數(shù)據(jù)庫

mysql_query("set names 'utf8'");

if (!$link) {

die('Could not connect: ' . mysqli_error());

}

echo '數(shù)據(jù)庫連接成功!';

mysqli_close(!$link);



ps:本地的mysql 庫端口已經(jīng)改成3307了.

正在回答

3 回答

先測(cè)試一下配置有沒有問題,再試試前端數(shù)據(jù)能不能傳入數(shù)據(jù)庫

0 回復(fù) 有任何疑惑可以回復(fù)我~

我已經(jīng)不確定是否 連上去了...

反正查不出數(shù)據(jù)。。。

0 回復(fù) 有任何疑惑可以回復(fù)我~

連上去了 不過報(bào)可一大堆 警告..啥意思呀?


Warning: mysql_select_db(): in?D:\sts\Phphello\mysql.php?on line?11

Warning: mysql_select_db(): A link to the server could not be established in?D:\sts\Phphello\mysql.php?on line?11

Warning: mysql_query(): in?D:\sts\Phphello\mysql.php?on line?12

Warning: mysql_query(): A link to the server could not be established in?D:\sts\Phphello\mysql.php?on line?12
數(shù)據(jù)庫連接成功!
Warning: mysqli_close() expects parameter 1 to be mysqli, boolean given in?D:\sts\Phphello\mysql.php?on line?17

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消
PHP進(jìn)階篇
  • 參與學(xué)習(xí)       181954    人
  • 解答問題       2668    個(gè)

輕松學(xué)習(xí)PHP中級(jí)課程,進(jìn)行全面了解,用PHP快速開發(fā)網(wǎng)站程序

進(jìn)入課程

數(shù)據(jù)庫連接失敗....

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)