$pwd, "Database"=>"test");$conn = sqlsrv_connect( $serverName, $connectionInfo);if( $conn == false){ ec">
时间:2021-07-01 10:21:17 帮助过:19人阅读
$uid, "PWD"=>$pwd, "Database"=>"test");$conn = sqlsrv_connect( $serverName, $connectionInfo);if( $conn == false){ echo "连接失败!"; die( print_r( sqlsrv_errors(), true));}else{ echo "连接成功";//执行有结果集的SQL语句 $query = sqlsrv_query($conn, "select ID,NAME from stuff"); while($row = sqlsrv_fetch_array($query)) { echo $row[0]."-----".$row[1]."
"; } sqlsrv_close( $conn);}
28 行的 echo 前面是全角空格
代码是网上复制来的吧?
我操,复制粘贴害死人啊,谢谢楼上