Excuse me, this $this ——》How do you type the one behind this this? What is it?
按键盘手指磨破皮2017-09-05 23:01:51
Someone has answered the function and I will answer how to use it. . . This is so simple. In non-input method mode, add the - sign to the right of the + sign on the main keyboard 0 and to the left? The > sign to the left of the key, this > can only be typed by holding down the shift key. To switch between input method mode and letter input mode, just press shift.
ringa_lee2017-09-05 17:37:04
First of all, you need to understand what $this is and what is its role?
$this is a pointer to the current object. To put it bluntly, it means the previous object. This can realize, for example, class attribute method calls, etc.
阿布是老黑2017-09-05 16:28:51
$this->So-and-so method.
For example
class man{
function test1(){
$this->test2();
}
function test2(){
echo "hello";
}
}
$m = new man();
$m->test1();
//Output: hello;