I declare a variable as private in the body of the class and set it to null. After that, I access the variable by a function in the class and initialize it. When I try to rea开发者_JAVA技巧d the value of this variable from another function, it's always null! Did I miss something?
ooooo I did a big mistake. I was accessing the variables like that
$variable
instead of
$this->variable
精彩评论