Imitate $this->show() in TP5 Controller
RiVol
RiVol 2018-03-07 00:00:03
0
2
1437

class Controller{ # Controller base class

public function show(){ # Load the view page

require "./App/".PLATFORM."/View/".CONTROLLER ."/".ACTION.".php";

}

}


RiVol
RiVol

老铁们,稳!

reply all(1)
右耳

After using the above code, the Model layer data will become invalid, so I modified it:

Put the following code into the Model:

class Model{

# Load the view page

public function show(){

return "./App/".PLATFORM."/View/".CONTROLLER."/".ACTION.". php";

}

}

Call

$ind = new IndexModel();

require $ind->show();


  • reply Welcome everyone to correct me
    RiVol author 2018-03-07 00:30:18
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template