ThinkPHP5出现错误Call to undefined function app\index\controller\M()
ThinkPHP5与ThinkPHP3相比,变化还是非常大的,在TP3当中使用M方法是没有问题的,但在TP5里面,会直接报错,错误提示为:
Call to undefined function app\index\controller\M()
这个错误在没有详细的文档说明下,处理起来也还是要花一些时间的。因此将TP3对应的M方法及其它方法,在此对应一下,以便参考:
| TP3 | TP5 |
|---|---|
| S | cache |
| C | config |
| M/D | model |
| U | url |
| I | input |
| E | exception |
| L | lang |
| A | controller |
| R | action |
