|
本帖最后由 Closer 于 2015-1-6 15:24 编辑
Unable to connect to your database server using the provided settings.
Filename: C:\webroot\CodeIgniter\system\database\DB_driver.php
Line Number: 124
以上是问题内容。
我又用代码调试发现:
A PHP Error was encounteredSeverity: 4096
Message: Argument 2 passed to sqlsrv_connect() must be of the type array, string given, called in C:\webroot\CodeIgniter\system\database\DB.php on line 41 and defined
Filename: config/database.php
Line Number: 79
以一下是我的database.php的配置
$db['default']['hostname'] = '192.168.8.120,1433';
$db['default']['username'] = 'tx002';
$db['default']['password'] = 'tx002';
$db['default']['database'] = 'ENVI';
$db['default']['dbdriver'] = 'sqlsrv';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;
|
|