释放双眼,带上耳机,听听看~!
TP5.1 和 TP5的版本 目录结构不太一样
TP5.1的路由文件是独立的一个文件夹
在使用的时候写入以下代码:
use thinkRoute; Route::get('/',function (){ return 'hello world'; });
会报以下错误:
ErrorException in route.PHP line 15 Non-static method thinkRoute::get() should not be called statically
解决办法是注释掉 use thinkRoute; 即可.
虽然不知道为什么会这样…但确实注释掉就可以了, 比较鸡肋…
记录一哈.
-End-
文章来源于互联网:[记录]TP5.1路由报错Non-static method thinkRoute::get() should not be called statically解决办法