$db_host = "localhost";

$db_user = "root"

$db_passwd ="db패스워드";

$db_name ="사용할 DB명";

 

$DBConn = mysqli_connect($db_host, $db_user, $db_passwd, $db_name);

mysqli_query($DBConn, "Set names utf8;"); //인코딩

 

DB연결 성공인지 확인 하는 방법

 

if($DBConn){

echo "성공";

}else{

echo "실패 : " . mysqli_connect_error();

}

 

 

 

+ Recent posts