Welcome Guest, Not a member yet? Register   Sign In
How to call a variable globally
#1

[eluser]cinewbie81[/eluser]
Hi guys,

I have a file ‘globalsetting.php’ as following:

Code:
<?php

class Globalsetting extends Controller {

    function Globalsetting()
    {    
        parent::Controller();
    }

    // Initialization function  
    function Initialize()
    {
           $DB1 = $this->load->database('MYDB1', TRUE);
           $DB2 = $this->load->database('myDB2', TRUE);
           $MyClient = "DELL";            
    }
}
My problem is:

How can i call variables DB1, DB2, and MyClient from other controller class ?? Anyone ? IS that correct that I put Globalsetting class extend from controller ? Hope someone can helkp as I’m stuck here for quite a while .. thanks in advance


Messages In This Thread
How to call a variable globally - by El Forum - 10-21-2007, 11:02 PM
How to call a variable globally - by El Forum - 10-21-2007, 11:56 PM
How to call a variable globally - by El Forum - 10-21-2007, 11:59 PM
How to call a variable globally - by El Forum - 10-22-2007, 12:11 AM
How to call a variable globally - by El Forum - 10-22-2007, 12:39 AM
How to call a variable globally - by El Forum - 10-22-2007, 12:47 AM
How to call a variable globally - by El Forum - 10-22-2007, 12:49 AM
How to call a variable globally - by El Forum - 10-22-2007, 12:52 AM
How to call a variable globally - by El Forum - 10-22-2007, 01:13 AM
How to call a variable globally - by El Forum - 10-22-2007, 02:30 AM



Theme © iAndrew 2016 - Forum software by © MyBB