Assume there is an A controller and a B controller. How can the variables defined in the A controller be called by the B controller after being assigned by the function of the A controller? I've tried using global variables, but it doesn't work either. Please give me an answer!
Let controller B inherit controller A
class?A?{ ????public?$a; ????public?function?__construct()?{ ????????$this->a?=?1; ????} } class?B?extends?A?{ ????public?function?fb()?{ ????????echo?$this->a; ????} }