您现在的位置是:PHP7连接mssql测试代码
PHP7连接mssql测试代码
ini_set("display_errors", "on"); // 显示错误提示,仅用于测试时排查问题 $dbms = 'sqlsrv'; $host = '192.168.1.101,1433'; $user = ''; $password = ''; $dbname = ''; $dsn = "{$dbms}:Server={$host};Database={$dbname}"; $DB = new PDO($dsn, $user, $password); var_dump($DB);
Fatal error: Uncaught PDOException: SQLSTATE[IMSSP]: This extension requires the Microsoft ODBC Driver for SQL Server to communicate with SQL Server. Access the following URL to download the ODBC Driver for SQL Server for x64: https://go.microsoft.com/fwlink/?LinkId=163712
需要安装 ODBC Driver
站长简介
分类
最新文章
热门文章
- 微信支付退款结果通知解密
- 到ICANN投诉三五互联获取域名转移密码成功
- Linux修改密码提示passwd /usr/share/cracklib/pw_dict: error reading header
- {"errcode":45047,"errmsg":"out of response count limit hint]"}
- 微信html弹出点击右上角分享到朋友圈
- Apache禁用TRACE Method和添加X-frame-options响应头
- PHP将B转换为KB、MB、GB
- 构建微信公众号被动回复image图片消息xml
- mysqld_safe Number of processes running now
- CentOS使用chkconfig提示systemctl enable xxxx.service