Environment for php configuration problems: win7iis7.5php5.3.10mssql2008 use php to connect to Microsoft sqlsrv under SQL. After installation, you can use helloworld to test Microsoft's test case: PHPcode & lt ;? Php * ConnecttothelocalserverusingWindowsAuthenticationands about php configuration
Environment: win7 iis7.5 php5.3.10 mssql 2008
Use php to connect Microsoft sqlsrv under SQL. Hello world
Test cases for Microsoft:
PHP code
$value) { echo $key.": ".$value."\n"; }}else{ echo "Client info error.\n";}/* Close connection resources. */sqlsrv_close( $conn);?>
The result is as follows:
Cocould not connect. array ([0] => Array ([0] => 08001 [SQLSTATE] => 08001 [1] => 53 [code] => 53 [2] => [Microsoft] [SQL Server Native Client 10.0] Named Pipes Provider: cocould not open a connection to SQL Server [53]. [message] => [Microsoft] [SQL Server Native Client 10.0] Named Pipes Provider: cocould not open a connection to SQL Server [53].) [1] => Array ([0] => HYT00 [SQLSTATE] => HYT00 [1] => 0 [code] => 0 [2] => [Microsoft] [SQL Server Native Client 10.0] Login timeout expired [message] => [Microsoft] [SQL Server Native Client 10.0] Login timeout expired) [2] => Array ([0] => 08001 [SQLSTATE] => 08001 [1] => 53 [code] => 53 [2] => [Microsoft] [SQL Server Native Client 10.0] A network-related or instance-specific error has occurred while establishing a connection to SQL Server. server is not found or not accessible. check if instance name is correct and if SQL Server is configured to allow remote connections. for more information see SQL Server Books Online. [message] => [Microsoft] [SQL Server Native Client 10.0] A network-related or instance-specific error has occurred while establishing a connection to SQL Server. server is not found or not accessible. check if instance name is correct and if SQL Server is configured to allow remote connections. for more information see SQL Server Books Online .))
How is his mother doing. I have been engaged for two days. It's going crazy. Who can help
------ Solution --------------------
$ ServerName = "'local '";
$ Conn = sqlsrv_connect ($ serverName );
????
Do I have to connect to the database with a user name? When is it so generous?
Local indicates the only instance in the current service I.
------ Solution --------------------
To read this reply, log on to or register CSDN!
------ Solution --------------------
To read this reply, log on to or register CSDN!
------ Solution --------------------
To read this reply, log on to or register CSDN!