ThinkPHP 是一个基于 PHP 的轻量级 Web 开发框架。在命令行中,您可以使用以下参数来执行一些常见的任务:
- 安装 ThinkPHP:
composer create-project topthink/think tp_name
- 运行开发服务器:
php think run
或
php think s
- 生成应用密钥:
php think key:generate
- 创建控制器:
php think make:controller ControllerName
- 创建模型:
php think make:model ModelName
- 创建中间件:
php think make:middleware MiddlewareName
- 创建自定义命令:
php think make:command CommandName
- 运行计划任务:
php think schedule:run
- 清除缓存:
php think cache:clear
- 清除配置缓存:
php think config:clear
- 清除视图缓存:
php think view:clear
- 运行数据表迁移:
php think migrate
- 回滚数据表迁移:
php think migrate:rollback
这些命令只是 ThinkPHP 命令行参数的一部分。您可以在官方文档中查看更多详细信息:https://www.kancloud.cn/manual/thinkphp6_0/content