有什么方法可以解决此错误?

时间:2020-03-20 06:01:44

标签: php sql-server pdo yii2

数据库异常–

yii\db\Exception
SQLSTATE[08001]: [Microsoft][ODBC Driver 17 for SQL Server]SQL Server Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].
Error Info: Array
(
    [0] => 08001
    [1] => -1
    [2] => [Microsoft][ODBC Driver 17 for SQL Server]SQL Server Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF]. 
)
↵
Caused by: PDOException
SQLSTATE[08001]: [Microsoft][ODBC Driver 17 for SQL Server]SQL Server Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].
in C:\inetpub\wwwroot\rbss\vendor\yiisoft\yii2\db\Connection.php at line 698

1. in C:\inetpub\wwwroot\rbss\vendor\yiisoft\yii2\db\Connection.phpat line 635
626627628629630631632633634635636637638639640641642643644 

PHP代码:

    if ($enableProfiling) {
    Yii::endProfile($token, __METHOD__);
        }
    } catch (\PDOException $e) {
        if ($enableProfiling) {
            Yii::endProfile($token, __METHOD__);
        }

        throw new Exception($e->getMessage(), $e->errorInfo, (int) $e->getCode(), $e);
    }
    }

    /**
     * Closes the currently active DB connection.
     * It does nothing if the connection is already closed.
    */
    public function close()
    {

0 个答案:

没有答案