TP, Controller $ this-& gt; can only call the method and attribute of the current controller. 1: PHPcode & lt ;? PhpclassHelloActionextendsAction {publicfunctionIndex () {$ this-& gt;} TP, Controller $ this-> can only call the method and attribute of the current controller.
1: it was okay yesterday,
PHP code
} }?>
Normally, the method of the parent class can be prompted. here, only one Index is prompted.
Then I looked at the TP core directory, which has the assign method, that is, it cannot be called.
2: Then I manually $ this-> display without prompting, and then prompt that the template does not exist,
The template does not exist [D:/wamp/www/Tphp/Tpl/Home/Hello/index. tpl]
But there is such a file in this directory.
In addition, my actions are red. phpstorm is used, and no error is found...
Red is not noticed after the prompt...
------ Solution --------------------
But why not?
Who prompts ???
------ Solution --------------------
There may be conflicts!
------ Solution --------------------
I have been developing PHP for several years, but why can't I understand it when I look at it? It seems that I am old.
Discussion
But why not?
Who prompts ???
------ Solution --------------------
Let's take a look at your $ this-> display (); method.
------ Solution --------------------
The runtime file has not been re-compiled.