#ldconfig
/usr/local/freetds/etc
[global]
# TDS protocol version
; tds version = 4.2
# Whether to write a TDSDUMP file for diagnostic purposes
# (setting this to /tmp is insecure on a multi-user system)
; dump file = /tmp/freetds.log
; debug flags = 0xffff
# Command and connection timeouts
; timeout = 10
; connect timeout = 10
# If you get out-of-memory errors, it may mean that your client
# is trying to allocate a huge buffer for a TEXT field.
# Try setting 'text size' to a more reasonable limit
text size = 64512
host = 51.102.121.217
port = 1433
tds version = 8.0
client charset = GBK
<?php
$conn=mssql_connect("51.102.121.217","sa",xaj!@34);
if($conn)
{
echo "ok";
} else
{
echo "no";
}
参考http://coralzd.blog.51cto.com/90341/525106