tp5.1相关
这里只是个人记录用的~~~ 1. 生成项目 composer create-project topthink/think=5.1.* tp5(tp5为文件夹名 也就是项目名) 2. 生成模块 php think build --module admin 3. 生成控制器 php think make:controller admin/Index --plain 4. 生成模型 php think make:model admin/User 5. 生成验证器 php think make:validate admin/User 6. nginx修改内容部分 location / { if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=/$1 last; break; } try_files $uri $uri/ /index.php$is_args$args; autoindex on; } 7. 邮件扩展 http://packagist.org 搜phpmailer 安装命令:composer require phpmailer/phpmailer直接在项目目录下面执行 配置写在了application目录下的common.php这个公共文件中 方法如下: <?php // 应用公共文件 // 发送邮件 use