Call function inside __construct with php
问题 A simple PHP problem I couldn't find the answer to. Is it possible to call a function from the "__construct()"? For example if I use the My_Controller solution here. If I add my own function below, like if I have a more advanced auth, can I call it from the construct? 回答1: Yes, using the format $this->myNewFunction(); 来源: https://stackoverflow.com/questions/6533724/call-function-inside-construct-with-php