Welcome Guest, Not a member yet? Register   Sign In
where to put vars for use in all controller's functions?
#2

[eluser]Grahack[/eluser]
Code:
<?php
class Photo extends Myglobals {

var $my_var = '';

    function Photo()
    {
        parent::Controller();        // don't forget this !!!
        $this->my_var = 'initialized';
    }

    function index()
    {
        echo $this->my_var;
    }  
}

should work.


Messages In This Thread
where to put vars for use in all controller's functions? - by El Forum - 12-29-2007, 11:58 AM



Theme © iAndrew 2016 - Forum software by © MyBB