How to connect code igniter 3.1.8 with sql server 2000

扶醉桌前 提交于 2019-12-13 03:32:26

问题


I'm trying to connect Code Igniter 3.1.8 with sql server 2000 but was not possible, i'm use php 5.6, Does someone know to make it works? this is my config database

$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);

and this is my controller for call dummy data from table

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;

}

and i was enabling in php.ini

extension=php_sqlsrv_56_ts.dll

thanks for help me,

来源:https://stackoverflow.com/questions/50071924/how-to-connect-code-igniter-3-1-8-with-sql-server-2000

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!