Welcome Guest, Not a member yet? Register   Sign In
External DB - error from __construct
#1

Hi!

I need to connect my app to external database, but when I chage parameters I getting error from __construct function:

Code:
Unable to connect to database server using the specified settings.
Filename: core/MY_Controller.php

Line Number: 8

This is fragment of this file:
PHP Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class 
MY_Controller extends CI_Controller {

 protected 
$UserData;

 public function 
__construct() {
 
parent::__construct();        // line 8

 
$UserData $this->ion_auth->user()->row();

 } 

When I delete the entire function, I get the same error but with another file.
Why? Maybe I forgot something?
Reply


Messages In This Thread
External DB - error from __construct - by vertisan - 11-12-2015, 04:13 PM



Theme © iAndrew 2016 - Forum software by © MyBB