Home > Backend Development > PHP Tutorial > thinkphp连接不上sqlserver2005,该怎么处理

thinkphp连接不上sqlserver2005,该怎么处理

WBOY
Release: 2016-06-13 12:04:29
Original
1104 people have browsed it

thinkphp连接不上sqlserver2005
http://www.thinkphp.cn/Uploads/editor/2013-10-25/5269ead26c98f.jpg
php的扩展已经添加了,如果用php也可以连接上数据库了,但是我在用thinkphp连接sqlserver2005的时候就会出现“系统不支持:mssql”,的提示
我的配置是:
http://www.thinkphp.cn/Uploads/editor/2013-10-25/5269eb6cda5f8.jpg
求指点,为什么thinkphp连接不上sqlserver呢? 捉急中……
------解决方案--------------------
请正确选择 php加载ntwdblib.dll版本 
经测试 sqlserver 2008 对应 ntwdblib.dll版本 2000.80.194.0
是没有问题的。

如果你是正确按照 php连接sqlserver
还出现thinkphp连接mssql失败,
请下载资源ntwdblib.dll
将这个文件放在system32下面

------解决方案--------------------
这是我的thinkphp的conf文件

if (!defined('THINK_PATH')) exit();<br />return array(<br />    'DB_TYPE'            => 'mssql',	        // 使用的数据库类型<br />    'DB_HOST'            => 'localhost',<br />    'DB_NAME'            => 'tp',	    	// 数据库名<br />    'DB_USER'            => 'sa',	    	// 数据库账号<br />    'DB_PWD'             => '123456',	        // 数据库密码<br />    'DB_PORT'            => '1433',
Copy after login

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template