Welcome Guest, Not a member yet? Register   Sign In
a quesion
#1

[eluser]flash866[/eluser]
Code:
$this->session->set_userdata($sessdata);

in this code , why have two '->' ? what's mean?

can you take a example?
#2

[eluser]flash866[/eluser]
Code:
<?php
class c1{
    var $test;
    function __construct(){
        $this->test=new efg();
    }
}
class efg{
    function w(){
        echo 'love you!';
    }
}

$a=new c1;
$a->c1->w();
?>
But this code is error:
Fatal error: Call to a member function w() on a non-object in C:\Documents and S
ettings\Ltd\My Documents\Noname1.php on line 15
请按任意键继续. . .
#3

[eluser]flash866[/eluser]
Code:
$a=new c1;
$a->test->w();
the error is find,ha ha.




Theme © iAndrew 2016 - Forum software by © MyBB