简体   繁体   中英

Connect to Mssql 2008 sever remotely through php

Quick question: I am having issues while trying to connect to a mssql 2008 server through php. The php script is located on a different server. Does the mssql server have to have php installed on it? or only the server which I am running the script from?

Only the server you are running PHP on. If there's a connection error, you may be having issues with you connection string or with the raw networking (for instance, the port you are trying to connect to is blocked on the remote server).

If you take a look at the documentation for mssql in PHP, you can see that it accepts both local and external addresses (computer or server, port).

The server running mssql, to which you're connecting, doesn't need PHP enabled.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM