get_host_info
MySQL Server 호스트 이름 및 연결 유형을 반환합니다.
host_info()
/ mysqli_get_host_info()
함수는 mysql 서버 호스트 이름과 연결 유형을 반환합니다.
서버 호스트 이름 및 연결 유형을 반환합니다.
<? php $ mysqli = new mysqli ( "localhost" , "my_user" , "my_password" , "my_db" ) ; if ( $ mysqli- > connect_errno ) { Echo "MySQL에 연결하지 못했습니다 :" . $ mysqli- > connect_error ; 출구 ( ) ; } echo $ mysqli- > host_info ( ) ; $ mysqli- > close ( ) ; ?>
서버 호스트 이름 및 연결 유형을 반환합니다.
<? php $ con = mysqli_connect ( "localhost" , "my_user" , "my_password" , "my_db" ) ; if ( mysqli_connect_errno ( ) ) { Echo "MySQL에 연결하지 못했습니다 :" . mysqli_connect_error ( ) ; 출구 ( ) ; } echo mysqli_get_host_info ( $ con ) ; mysqli_close ( $ con ) ; ?>