2015-09-03 67 views

回答

0

首先你必須安裝跟隨着包:PHP5-pgsql的

sudo apt-get install php5-pgsql 

然後重新啓動Apache:

sudo /etc/init.d/apache2 stop 

sudo /etc/init.d/apache2 start 

現在,你設置笨3的文件database.php中

$db['default'] = array(
    'dsn' => '', 
    'hostname' => 'localhost', 
    'username' => 'tu_usuario', 
    'password' => 'tu_clave', 
    'database' => 'tu_base_de_datos', 
    'dbdriver' => 'postgre', 
    '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, 
    'port' => 5432, 
); 

推特:@ luiscordero29

+0

我不能說的代碼,但由於原來的帖子是英文,我會認爲你的迴應也應該爲後代。 – wahwahwah