inflearn logo
Khóa học

Khóa học

Chia sẻ kiến thức

Bài viết của withsonny

withsonny withsonny

@withsonny

Số lượng đánh giá đã viết
1
Xếp hạng trung bình
5.0

Bài viết 1

Hỏi & Đáp

mssql 연동문제 (PHP 7.0이상)

1) php\ext 경로에 다음 2개의 dll을 다운로드하여 추가했습니다. php_sqlsrv.dll php_pdo_sqlsrv.dll 2) php.ini 파일에 아래 내용을 추가했습니다. extension=php_sqlsrv.dll extension=php_pdo_sqlsrv.dll 3) mssql_php.php 내용을 다음과 같이 sqlsrv에 맞게 작성했습니다. (PWD 변경 필요) "sa", "PWD"=>"root" ); $conn = sqlsrv_connect( $serverName, $connectionInfo); if( $conn === false ) { die( print_r( sqlsrv_errors(), true)); } $sql = "SELECT @@VERSION"; $stmt = sqlsrv_query( $conn, $sql); if( $stmt === false ) { die( print_r( sqlsrv_errors(), true)); } $row = sqlsrv_fetch_array($stmt); echo $row[0]; sqlsrv_free_stmt($stmt); ?>

Lượt thích
0
Số bình luận
1
Lượt xem
421