thinkphp6 think-swoole:v3 踩坑记录
安装 thinkphp6
composer create-project topthink/think tp
安装 think-swoole
composer require topthink/think-swoole
linux docker 安装 swoole
cd /home #进入home目录
git clone https://gitee.com/swoole/swoole.git #下载swoole
docker cp swoole 容器ID:/usr/src/php/ext #复制swoole到php容器的扩展目录中
docker exec -it php /bin/bash #进入容器
docker-php-ext-insall swoole #php安装swoole 扩展
#### 如果你的swoole 需要 开启openssl 往下看
apt-get update # 升级apt-get
apt-get install libssl-dev -y # 安装 libssl-dev
docker-php-ext-configure swoole --enable-openssl #编译设置配置项 开启 openssl
docker-php-ext-insall swoole 执行swoole 即可
tp6 开启多应用模式
1.首先在 根目录下config中 打开app.php
'app_map' => [
'admin' => 'admin',//类似于分组 访问/api => 访问 api 应用
'*' => 'index', //其他就是 index 应用
],
在a