首页 新闻 赞助 找找看

php连接数据库失败,数据源也加上了还是出错,求大神破解

0
悬赏园豆:10 [已关闭问题] 关闭于 2015-05-11 08:46

Notice: Undefined variable: observTime in C:\webroot\connectSQLServer\queryStationInfo.php on line 17
{"status":"N","error":"\u6570\u636e\u5e93\u8fde\u63a5\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5\u6570\u636e\u5e93\u662f\u5426\u6b63\u5e38\uff01"}array(2) { [0]=> array(6) { [0]=> string(5) "IMSSP" ["SQLSTATE"]=> string(5) "IMSSP" [1]=> int(-49) ["code"]=> int(-49) [2]=> string(216) "This extension requires the Microsoft SQL Server 2012 Native Client. Access the following URL to download the Microsoft SQL Server 2012 Native Client ODBC driver for x86: http://go.microsoft.com/fwlink/?LinkId=163712" ["message"]=> string(216) "This extension requires the Microsoft SQL Server 2012 Native Client. Access the following URL to download the Microsoft SQL Server 2012 Native Client ODBC driver for x86: http://go.microsoft.com/fwlink/?LinkId=163712" } [1]=> array(6) { [0]=> string(5) "IM002" ["SQLSTATE"]=> string(5) "IM002" [1]=> int(0) ["code"]=> int(0) [2]=> string(97) "[Microsoft][ODBC 驱动程序管理器] 未发现数据源名称并且未指定默认驱动程序" ["message"]=> string(97) "[Microsoft][ODBC 驱动程序管理器] 未发现数据源名称并且未指定默认驱动程序" } } bool(true)

浮沉183的主页 浮沉183 | 初学一级 | 园豆:192
提问于:2015-02-13 10:27
< >
分享
所有回答(2)
0

This extension requires the Microsoft SQL Server 2012 Native Client. Access the following URL to download the Microsoft SQL Server 2012 Native Client ODBC driver for x86: http://go.microsoft.com/fwlink/?LinkId=163712

 

Launcher | 园豆:45045 (高人七级) | 2015-02-13 10:53

能不能详细的说一下,学徒一个,对这些东西还不是很了解,我是用的SqlServer 2008+php5

支持(0) 反对(0) 浮沉183 | 园豆:192 (初学一级) | 2015-02-13 11:03

@浮沉183: 

This extension requires the Microsoft SQL Server 2012 Native Client. Access the following URL to download the Microsoft SQL Server 2012 Native Client ODBC driver for x86: http://go.microsoft.com/fwlink/?LinkId=163712

这句话是什么意思,你能看懂不?或者你说你不懂英文,想让人帮你翻译下?

你是学徒就已经比我厉害了,因为我连 PHP 的代码都没写过。

支持(0) 反对(0) Launcher | 园豆:45045 (高人七级) | 2015-02-13 11:12

@Launcher: 

这个扩展需要Microsoft SQL Server 2012本地客户端。访问以下URL下载Microsoft SQL Server 2012 x86原生客户端ODBC驱动程序:http://go.microsoft.com/fwlink/?LinkId=163712

 

为什么我用的是SqlServer 2008,却需要2012客户端

我是想问,安装客户端后还需要做什么才能成功访问?

支持(0) 反对(0) 浮沉183 | 园豆:192 (初学一级) | 2015-02-13 11:17

@浮沉183: 你先装一个试试呗,你也可以安装 Microsoft SQL Server 2008 Native Client ODBC driver for x86。目前你的错误提示就提到了这个,你先按照错误提示修改。之后再有啥,接着看新的错误提示呗。

支持(0) 反对(0) Launcher | 园豆:45045 (高人七级) | 2015-02-13 11:21

@浮沉183: 环境是复杂的,

谁知道你服务器里面安装了些啥?

谁知道你PHP里面用了什么Extension。

从你提供的信息里面只能知道需要安装SQL2012,

也许是微软在骗你,也许不是,总之,需要试验。

支持(0) 反对(0) 爱编程的大叔 | 园豆:30839 (高人七级) | 2015-02-13 11:40
0

如果你想从事编程这个行业,把你的英文读到CET6级这个水平就可以了,要求也不高。

什么时候学英文都不会晚的,所以请马上开始吧。

爱编程的大叔 | 园豆:30839 (高人七级) | 2015-02-13 11:19

额,英文我是看懂了,只是想搞明白这个问题

支持(0) 反对(0) 浮沉183 | 园豆:192 (初学一级) | 2015-02-13 11:23
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册