Program written on this machine, the database in the company's other computer (sqlserver2008), the machine does not install any database software, the program can connect to the database
Source: Internet
Author: User
Program written on this machine, the database in the company on another computer (sqlserver2008), the machine does not install any database software, the program can connect to the database
If I enter such a line of code in conn.php and run
The computer that holds the database ip:192.168.1.221
$conn = Sqlsrv_connect ("192.168.1.221", Array ("Database" = "DatabaseName", "UID" = ' sa ', "PWD" = ' pass123 ')) Or Die (Print_r (Sqlsrv_errors ()));
Then enter localhost/cnn.php in the address bar can I get a connection?
------to solve the idea----------------------
SQLSTATE 08001
This is SQL Server does not have remote connection enabled
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.