1 回答
TA贡献1836条经验 获得超13个赞
$active_group = 'default'; $query_builder = TRUE; $db['default'] = array(
'dsn' => '',
'hostname' => 'computer_name\SQLEXPRESS',
'port' => '1433',
'username' => 'username',
'password' => '*****',
'database' => 'database_name',
'dbdriver' => 'sqlsrv',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);
首先,我需要在我的计算机上安装 sql server php 驱动程序来安装扩展。下载驱动程序然后解压,然后将 php_pdo_sqlsrv_72_nts_x64.dll、php_pdo_sqlsrv_72_ts_x64.dll、php_sqlsrv_72_nts_x64.dll、php_sqlsrv_72_ts_x64.dll 复制到 /php/ext。然后将它们添加extension=php_pdo_sqlsrv_72_nts_x64.dll extension=php_pdo_sqlsrv_72_ts_x64.dll extension=php_sqlsrv_72_nts_x64.dll extension=php_sqlsrv_72_ts_x64.dll
到/php/php.ini中。重新启动阿帕奇
- 1 回答
- 0 关注
- 85 浏览
添加回答
举报