Welcome Guest, Not a member yet? Register   Sign In
Connecting outside database
#1

[eluser]E-Finity Internet[/eluser]
Hello,

I am currently developing a CMS on my local webserver with the settings of the loading CMS. When I import data from one site to change, I make a connection to an external database.

When I make contact with a website on the same server, so good. When I connect with a website wants to make another server, is wrong. Here I get an error page every time.

Currently I use the following code to connect to the database:

$website = $this->session->userdata('website');

Code:
$dsn = 'mysql://'.$website['db_user'].':'.$website['db_ww'].'@'.$website['db_host'].'/'.$website['db_name'].'?char_set=utf8&dbcollat=utf8_general_ci&cache_on=false';
        $this->second_db = $this->load->database($dsn,TRUE);        
        $this->load->helper('url');


On the remote server I host my data access to the database approach.

Can anyone give me an explanation for this, or should I in a different way?


Messages In This Thread
Connecting outside database - by El Forum - 02-09-2010, 02:43 AM



Theme © iAndrew 2016 - Forum software by © MyBB