|
$db['js'] = array(
'dsn' => '',
'hostname' => '*********',
'username' => 'sa',
'password' => '************',
'database' => 'jstcc',
'dbdriver' => 'sqlsrv',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => TRUE,
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);
这是database代码,
public function getjs(){
$DB = $this->load->database('js',TRUE);
$sql = "select * from Identify";
$query = $DB->query($sql);
return $query->result_array();
}
这是调用的方法,显示
A PHP Error was encountered
Severity: Error
Message: Call to undefined function sqlsrv_connect()
Filename: sqlsrv/sqlsrv_driver.php
Line Number: 144
Backtrace:
我用的php5.6的版本
请大家帮忙看一下 |
|