linux 中 php连接sqlserver2000
连接代码:
class="php"><?php $mssql=mssql_connect("192.168.0.104","sa","123456"); if ($mssql) { echo "Connent Mssql Succeed<br />"; mssql_select_db("jj2011"); $sql="select * from dbo.orders"; $queryuser = mssql_query($sql); $rowuser = mssql_fetch_assoc($queryuser); echo $rowuser['Order_ID']; } else { echo "connent Mssql Error!"; }
?连接失败 可能的原因:
(1)windows 中防火墙没有允许sql server2000:
?
(2)php.ini中需要添加
extension=mssql.so
?