我试图将Code Igniter 3.1.8与sql server 2000连接但是不可能, 我使用的是php 5.6, 有人知道让它有效吗? 这是我的配置数据库
$db['default'] = array(
'dsn' => '',
'hostname' => '200.200.200.242\SERVERBARU',
'port' => '1433',
'username' => 'sa',
'password' => 'm45t3r',
'database' => 'DEPO2017',
'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);
这是我从表
调用虚拟数据的控制器public function index()
{
$this->db = $this->load->database('default', TRUE);
$this->load->view('welcome_message');
echo "string";
$query = $this->db->query("select TOP 10 * from dbo.Dokter");
echo $query;
}
我在php.ini中启用
extension=php_sqlsrv_56_ts.dll
感谢您的帮助,