About PHP configuration Issues
Environment: Win7 iis7.5 php5.3.10 MSSQL 2008
Use PHP to connect to Microsoft's sqlsrv under SQL. Well, you can have Hello world.
Use test cases for testing Microsoft:
PHP Code
$value) { echo $key. ":". $value. " \ n "; }} else{ echo "Client info error.\n";} /* Close connection resources. */sqlsrv_close ($conn);? >
This appears as a result:
Could not connect. Array ([0] = = Array ([0] = = 08001 [SQLSTATE] = 08001 [1] = = [Code] = [2] = [Microsoft][sql Se RVer Native Client 10.0]named Pipes provider:could not open a connection to SQL Server [53]. [Message] = [Microsoft][sql Server Native Client 10.0]named Pipes provider:could not open a connection to SQL server [1] = = Array ([0] = HYT00 [SQLSTATE] = HYT00 [1] = 0 [Code] = 0 [2] = [Microsoft][sql Serv Er Native client 10.0]login timeout expired [message] = [Microsoft][sql Server Native Client 10.0]login timeout expire D) [2] = = Array ([0] = 08001 [SQLSTATE] = 08001 [1] = = [Code] = [2] = [Microsoft][sql Server Native Client 10.0]a network-related or instance-specific error have occurred while establishing A connection to SQL Serve R. Server is not a 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 have occurred while Establishing a connection to SQL Server. Server is not a 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. ) )
What's the matter with his mother? I've been doing this for two days. Going to freak out. Who can help?
------Solution--------------------
$serverName = "' Local '";
$conn = Sqlsrv_connect ($serverName);
????
Connect to the database don't even have a username? When was this generous?
Local represents the only instance of the current service I, what do you do at home with so many quotes
------Solution--------------------
If you need to read this reply, please login or register csdn!
------Solution--------------------
If you need to read this reply, please login or register csdn!
------Solution--------------------
If you need to read this reply, please login or register csdn!