Welcome Guest, Not a member yet? Register   Sign In
Question About Legacy Code....
#1

[eluser]drbigfresh[/eluser]
I am somewhat new to CodeIgniter, but I am trying to convert an old site over to the framework. I need to keep some of the old code working, since I don't have enough time to convert it all at once, but I am running into a problem with some of the old code. I have a page (in my views folder) that includes an old Database call like such:

include_once($_SERVER['DOCUMENT_ROOT'] . '/config/local_db.php');
include_once($_SERVER['DOCUMENT_ROOT'] . "/adodb/adodb.inc.php");


$db = NewADOConnection("mysql");

$db->Connect('localhost', 'root', 'xxx', 'xxx') or die($db->ErrorMsg());

If I go to the page directly, it works fine, but when I go thru the framework I get the 'unable to connect' error message. Does anyone have an idea on how to work around this or what the problem might be?

I have the controller for the page just doing some includes:

function showsubscribepage()
{
$data['title']="Subscription";

$this->load->view('view_header',$data);
$this->load->view('view_subscription',$data);
$this->load->view('view_footer',$data);

}

Any help is way appreciated. Thanks!


Messages In This Thread
Question About Legacy Code.... - by El Forum - 07-24-2008, 10:32 AM
Question About Legacy Code.... - by El Forum - 07-24-2008, 11:22 AM
Question About Legacy Code.... - by El Forum - 07-24-2008, 11:24 AM
Question About Legacy Code.... - by El Forum - 07-24-2008, 11:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB