国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

tp5 variable calling problem in different controllers
陳華強
陳華強 2020-05-08 21:45:55
0
2
1313

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!

陳華強
陳華強

reply all(2)
Storms

Inheritance of controller class

路邊的小螞蟻i

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;
????}
}

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template