[命令行]
本节介绍ThinkCMF命令行程序相关基础知识。
在命令行切换到ThinkCMF根目录(注意是think文件所在目录,不是public目录),执行如下命令:
php think
以上命令会输出项目下所有命令行程序:
ThinkPHP v6.0.12LTS & ThinkCMF v6.0.5Usage:command [options] [arguments]Options:-h, --help Display this help message-V, --version Display this console version-q, --quiet Do not output any message--ansi Force ANSI output--no-ansi Disable ANSI output-n, --no-interaction Do not ask any interactive question-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debugAvailable commands:clear Clear runtime filecli List lightweight CLI commandshelp Displays help for a commandlist Lists commandsrun PHP Built-in Server for ThinkPHPversion Show ThinkPHP & ThinkCMF versionmigratemigrate:create Create a new migrationmigrate:run Execute database migrationpublishpublish:app Publish a ThinkCMF apppublish:plugin Publish a ThinkCMF pluginpublish:theme Publish a ThinkCMF themeserviceservice:discover Discover Services for ThinkPHPvendorvendor:publish Publish any publishable assets from vendor packages
命令行执行的一般格式如下:
php think 命令 [参数]
