May 2019
C Language Output Yang Hui Triangle
PS quickly removes unwanted things such as watermarks
ThinkPHP 5.1 Middleware Notes
When writing API with ThinkPaPHP, under the same module, some methods (functions) need to verify login, and some methods (functions) do not need to verify login. Then I used "stupid methods", and the methods (functions) that need to verify login have to write a few lines to determine whether to log in, resulting in code redundancy and low code quality. I read carefully today ThinkPHP 5.1 Develop documents and learn a new skill middleware( https://www.kancloud.cn/manual/thinkphp5_1/564279 )
In this record, because of the lack of in-depth understanding of the ThinkPaP framework, it is inevitable that there are errors. Please Dalao point out how to correct them????
Create middleware
Think PHP 5.1 For detailed usage of middleware, please see the official document: https://www.kancloud.cn/manual/thinkphp5_1/564279
Method 1:
php think make:middleware Auth
If no accident occurs, the following prompt will be returned:
Method 2:
Write code