当前位置:网站首页>[PHP]TP6 CLI模式下创建tp6和多应用配置以及常见问题
[PHP]TP6 CLI模式下创建tp6和多应用配置以及常见问题
2022-06-22 06:18:00 【wyy7293】
命令行安装稳定版ThinkPHP
composer create-project topthink/think tp
tp => 项目的名称.可自定义
创建完成后,配置项目包括但不限于(访问入口,伪静态,端口,域名),保证能正常访问到
安装多应用模式扩展
composer require topthink/think-multi-app
删除 app 目录下的 controller 目录
多应用模式部署后,记得删除app目录下的controller目录(系统根据该目录作为判断是否单应用的依据)
使用命令创建应用
//php think build [api]应用名称
php think build index
php think build admin
php think build api
访问
http://127.0.0.1/api
安装扩展
composer require topthink/think-view
安装后才能使用View::fetch()
修改应用配置
config/app.php
// 默认应用
'default_app' => 'index',
// 应用映射(自动多应用模式有效)
'app_map' => [],
// 域名绑定(自动多应用模式有效)
'domain_bind' => [],
常见问题
使用View::fetch() 报错 (安装扩展)
- composer require topthink/think-view
mkdir(): Permission denied
- 通过
ps -ef |grep php命令查看php的执行用户是哪一个(一般是www)- chown -R www:www /www/wwwroot/tp6
- chmod -R g+rw /www/wwwroot/tp6
边栏推荐
- SQL 注入漏洞(十二)Cookie注入
- idea本地运行scope
- Expert PID control in Simulink
- Idea run scope locally
- MYSQL牛客刷题
- laravel Excel 3.1 列宽设置不起作用
- MySQL-IFNULL处理N/A
- BlockingQueue四组API
- Current harmonic suppression strategy of grid connected inverter with PIR controller regulator
- Huiding technology gr551x series development board supports openharmony
猜你喜欢

线程池的七大参数及自定义线程池

关于MNIST线性模型矩阵顺序问题
![Detailed interpretation of tab[i = (n - 1) & hash]](/img/be/3e84b3e8406833c2a235494f1a035f.png)
Detailed interpretation of tab[i = (n - 1) & hash]

h = key.hashCode()) ^ (h >>> 16) 详细解读以及为什么要将hashCode值右移16位并且与原来的hashCode值进行异或操作

生信可视化(part4)--相关性图

SQL 注入漏洞(十三)base64注入

Single cell thesis records (part9) -- spatial charting of single cell transcriptomes in lectures

Huiding technology gr551x series development board supports openharmony

SQL 注入漏洞(十一)宽字节注入

【NAND文件系统】UBI介绍
随机推荐
[Examen des points clés de l'informatique en nuage]
[Key review of cloud computing]
matlab 的离散pid控制
Little bear school bearpi HM micro officially integrated into openharmony trunk
为什么我选择 Rust
Callable
On the matrix order of MNIST linear model
基于卫星测深的牙买加沿岸水深测量
MiniGUl 1.1.0版本引入的新GDI功能和函数(二)
单细胞论文记录(part8)--Cell2location maps fine-grained cell types in spatial transcriptomics
878. 第 N 个神奇数字 数学+二分
postgresql数据库中根据某个字段判断存在则更新(update)操作,不存在则插入(insert)
单细胞论文记录(part10)--Computational challenges and opportunities in SRT data
leetcode每周3道(八)图之最短路
Research on automatic landing control system of carrier aircraft
Oracle之trim,ltrim,rtrim三个函数的用法
【Rust笔记】01-基本类型
牛客-TOP101-BM27
Generics in C #
Shengxin visualization (Part1) -- histogram
