当前位置:网站首页>thinkphp6 多级控制器目录访问解决方法
thinkphp6 多级控制器目录访问解决方法
2022-06-28 13:08:00 【生命不止、战斗不息】
thinkphp6 二级控制器目录访问
tp6的 controller 目录下面再新建一个文件夹,不使用路由的情况下 怎么访问,本文主要记录解决这个问题的办法。
类似于这种目录结构。在不使用路由的情况下,配置关闭路由。
目录结构如下:

路由访问的时候会将api目录当成控制器:

解决方式:
1.第一种是按照官网的方式,进行路由定义控制器定义 · ThinkPHP6.0完全开发手册 · 看云

效果:
原来的

现在的

就可以进行访问了:

边栏推荐
- VSCode 快捷键
- Mobile web training day-2
- Matlab plotyy coordinate axis setting, [reprint] example of MATLAB plotyy drawing double ordinate graph [easy to understand]
- pytorch基础
- 认识启动函数,找到用户入口
- PHP crawls web pages for specific information
- c语言中的类结构体-点号
- manjaro easyconnecy报错:libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
- Centos7——安装mysql5.7
- How to handle the safest account opening when downloading the mobile app of Huatai Securities
猜你喜欢

STM32F1与STM32CubeIDE编程实例-矩阵键盘驱动

电脑无线网络不显示网络列表应该如何解决

Après avoir échoué à l'examen d'entrée à l'Université de technologie de Harbin, vous devez rester à l'Université en tant que « chercheur » après avoir obtenu votre diplôme.

pytorch基础

Vscode如何设置代码保存后自动格式化

Fh511+tp4333 form an outdoor mobile power lighting camping lamp scheme.

高考失利進哈工大,畢業卻留校要當“探索者”,丁效:科研就是厚積薄發

新品体验:阿里云新一代本地SSD实例i4开放公测

求职简历的书写技巧
![[MySQL from introduction to mastery] [advanced part] (III) creation of MySQL users_ Modification_ Delete and password settings](/img/9c/2a0eb8f5ec03aebbe231dbdb388eca.png)
[MySQL from introduction to mastery] [advanced part] (III) creation of MySQL users_ Modification_ Delete and password settings
随机推荐
Deep understanding of Bayes theorem
Commonly used "redmine" for # test bug
K3s one click installation script
##测试bug常用“Redmine”
PHP gets the number of digits and replaces it with the specified mantissa
Stm32f1 and stm32cubeide programming example - matrix keyboard driver
List set to array
腾讯汤道生:面向数实融合新世界,开发者是最重要的“建筑师”
泛海微FH511单片机IC方案小家电LED照明MCU丝印FH511
一文抄 10 篇!韩国发表的顶级会议论文被曝抄袭,第一作者是“原罪”?
SHAREit实力出众,登陆全球 IAP 实力榜 Top7
词云的可视化设计教程
Mysql database literacy, do you really know what a database is
Après avoir échoué à l'examen d'entrée à l'Université de technologie de Harbin, vous devez rester à l'Université en tant que « chercheur » après avoir obtenu votre diplôme.
PHP抓取网页获取特定信息
《天天数学》连载53:二月二十二日
JS class 并不只是简单的语法糖!
移动Web实训DAY-2
自定义MySQL连接池
The English translation of heartless sword Zhu Xi's two impressions of reading