![]() |
Connecting outside database - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Connecting outside database (/showthread.php?tid=27374) |
Connecting outside database - El Forum - 02-09-2010 [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'; 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? |