日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

php mssql image,linux+php连接mssql

發布時間:2024/10/8 linux 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 php mssql image,linux+php连接mssql 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

因為環境需要,linux+php連接mssql

安裝加載freetds模塊過程省略網上很多

在/etc/profile

中加入export PATH="$PATH:/usr/local/freetds/bin"

#echo "/usr/local/freetds/lib" >> /etc/ld.so.conf

source /etc/profile

#ldconfig

再配置freetds

/usr/local/freetds/etc

[root@xafcbackup ~]# cat /usr/local/freetds/etc/freetds.conf

[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

[root@xafcbackup etc]# cat /data/caijishuju/t.php

$conn=mssql_connect("51.102.121.217","sa",xaj!@34);

//test

if($conn)

{

echo "ok";

} else

{

echo "no";

}

?>

程序配置文件連接的是定義的名稱而不是ip否則不能連接!

參考http://coralzd.blog.51cto.com/90341/525106

總結

以上是生活随笔為你收集整理的php mssql image,linux+php连接mssql的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。