- 论坛徽章:
- 0
|
[数据库] mssql_connect连接非1433端口的连接串如何写?
连接地址:
http://php.morva.net/manual/en/function.mssql-connect.php
php at burntpopcorn dot net
04-Jun-2003 07:23
I don't see it mentioned here, but if you are using SQL Server 2000, then you should use a comma instead of a colon to specify the port, for example:
$sql = mssql_connect ("192.168.1.2,1433", "username", "password" or die ("Could not connect to database: ".mssql_get_last_message());
instead of:
$sql = mssql_connect ("192.168.1.2:1433", "username", "password" or die ("Could not connect to database: ".mssql_get_last_message());
This is exactly the correct connection string for a none-1433 mssql server connection.
192.168.1.2,1433 |
|