Some things about ThinkPHP6.1 multi-application mode

I won’t talk about TP installation, but start directly from the completion of the installation.

  1. Install the multi-app mode extensionthink-multi-app
composer require topthink/think-multi-app
  1. Delete the folder in the app directory (TP determines single application mode or multi-application mode based on whether there is this folder). controller

  2. Create app

// 创建 admin 应用
php think build admin
// 创建 api 应用
php think build api

Note: Make surevendor/services.php that the file contains the following two items
Insert image description here
Result verification:
www.xxx.com /admin (pay attention to the pseudo-static configuration, if not configured, you need to use www.xxx.com/index.php/admin)
Insert image description here
www.xxx.com/api (pay attention to the pseudo-static configuration, if not configured Need to use www.xxx.com/index.php/api)
Insert image description here
The multi-application configuration is completed here, and other content will be added later

Guess you like

Origin blog.csdn.net/qq_17627195/article/details/134575506