ThinkPHP5 + PHPStudy,自动生成目录结构方法

一、按照 build.php 定义的模块自动生成

cmd 命令:

D:\DEVELOP\PHPTools\PHPTutorial\WWW>
D:\DEVELOP\PHPTools\PHPTutorial\php\php-7.2.1-nts\php.exe think build

出现报错信息:

[think\exception\ErrorException]
include(D:\DEVELOP\PHPTools\PHPTutorial\WWW/application/build.php)
: failed to open stream: No such file or directory

把 build.php 文件手动移动到 application 目录下

再次运行 cmd 命令

Successed

二、自定义模块自动生成

cmd 命令:

D:\DEVELOP\PHPTools\PHPTutorial\WWW>
D:\DEVELOP\PHPTools\PHPTutorial\php\php-7.2.1-nts\php.exe think build --module project_name

再次运行 cmd 命令

Successed