[phplib] page_open inside a Class From: Cory Wright (cwright <email protected>)
Date: 08/17/01

Hello all,

I am fairly new to phplib, but have come across a problem that I haven't
been able to figure out. I have a class, CTS, that I want to setup all
the phplib functions in its constructor. Here is some of the code:

class CTS {

    function CTS($perm_level) {
        page_open(array("sess" => "CtsSession",
                        "auth" => "CtsCryptAuth",
                        "perm" => "CtsPerm"));
        // echo get_class($perm); //why does this print 'true'
        $perm->check("$perm_level");
    }
}

The above code produces the following error:

        Fatal error: Call to a member function on a non-object in
        CTS/CTS.php on line 36

I have tried changing $perm->check to $this->perm->check and have tried
declaring the $sess, $auth, and $perm variables as globals, with no
success.

The prepend file has been included and everything work right, but I am
getting lost in the classes.

Any help would be greatly appreciated.

R. Cory Wright

Cory Wright
Spire Network Services
cwright <email protected>

-- 
Abbestellen mit Mail an:   phplib-unsubscribe <email protected>
Kommandoliste mit Mail an: phplib-help <email protected>