Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/277.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 启用更详细的DBLib错误_Php_Sql Server - Fatal编程技术网

Php 启用更详细的DBLib错误

Php 启用更详细的DBLib错误,php,sql-server,Php,Sql Server,当我var_dump($db->errorInfo())时;当通过DBLib从PHP连接到远程MSSQL数据库时,如果查询中出现任何错误,我会得到: ( [0] => HY000 [1] => 6522 [2] => General SQL Server error: Check messages from the SQL Server [6522] (severity 16) [(null)] [3] => -1 [4] =>

当我var_dump($db->errorInfo())时;当通过DBLib从PHP连接到远程MSSQL数据库时,如果查询中出现任何错误,我会得到:

(
    [0] => HY000
    [1] => 6522
    [2] => General SQL Server error: Check messages from the SQL Server [6522] (severity 16) [(null)]
    [3] => -1
    [4] => 16
)
错误不是冗长的。 在我的本地Windows计算机上通过SQLSRV执行的同一个脚本对该问题给出了更详细的解释

那么,如何在DBLib中启用更详细的错误呢