>  기사  >  백엔드 개발  >  php 5.3连接 sqlserver数据库_PHP教程

php 5.3连接 sqlserver数据库_PHP教程

WBOY
WBOY원래의
2016-07-13 10:42:251122검색

1.php原有的mssql.dll在5.3以后已经不可用了 因此为了连接mssql数据库需要去微软的官网找sqlsrv.dll等地址如下

 

等文件

 喎?http://www.Bkjia.com/kf/ware/vc/" target="_blank" class="keylink">vcD4KPHA+1dK1vdfUvLrKytPDtcRwaHCw5rG+IMi7uvO4tNbGtb1waHDOxLz+vNC1xGV4dNbQPC9wPgo8cD6yotTacGhwLmluabzTyOujujwvcD4KPHA+Jm5ic3A7PC9wPgo8cD5bUEhQX1BET19TUUxTUlZdPGJyIC8+CmV4dGVuc2lvbj1waHBfcGRvX3NxbHNydl81M190c192YzkuZGxsPGJyIC8+CltQSFBfU1FMU1JWXTxiciAvPgpleHRlbnNpb249cGhwX3NxbHNydl81M190c192YzkuZGxsPC9wPgo8cD4mbmJzcDs8L3A+CjxwPtXi0fm7udKqyLexo8TjtcS7+sb3yc+wstewwctzcWxjbGkuZXhlt/HU8rK7xNzV/bOjway907XEPC9wPgo8cD4mbmJzcDs8L3A+CjxwPs/C1Ni12Na3yOfPwqO6PC9wPgo8cD5odHRwOi8vbXNkbi5taWNyb3NvZnQuY29tL2VuLXVzL2xpYnJhcnkvY2MyOTYxNzAuYXNweDwvcD4KPHA+Jm5ic3A7PC9wPgo8cD7RodbQxOO1xMS/serGvcyoscjI53g4NrvyeDY0PC9wPgo8cD4mbmJzcDs8L3A+CjxwPtauuvO+zb/J0tTBrL3TxOO1xHNxbCBzZXJ2ZXLK/b7dv+LByzwvcD4KPHA+yr7A/bT6wuvI58/Co7o8L3A+CjxwPiZuYnNwOzwvcD4KPHByZSBjbGFzcz0="brush:java;"> sa, PWD => erinERIN, Database => tphp ); $conn = sqlsrv_connect( $strServer, $connInfo ); var_dump( $conn ); if( $conn ) { echo success!; $query = sqlsrv_query( $conn, 'select * from puser' ); if( $query === false ) { sqlsrv_close( $conn ); die( 'empty'); } while( $row = sqlsrv_fetch_array( $query, SQLSRV_FETCH_ASSOC)) { var_dump( $row ); } sqlsrv_close( $conn ); } else { echo fail!; die( print_r( sqlsrv_errors(), true )); } ?>

 

 

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/635041.htmlTechArticle1.php原有的mssql.dll在5.3以后已经不可用了 因此为了连接mssql数据库需要去微软的官网找sqlsrv.dll等地址如下 等文件 vcD4KPHA+1dK1vdfUvLrKytPDtcRwaH...
성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.