Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

在多应用模式下,ThinkPHP 8.1.4 版本无法访问首页路由,而 8.1.3 版本可以正常访问。

Aperta
#3,188 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
php
Ambito
backend

Direzione di ricerca

Reproduce the root-route request with the shown multi-application configuration, PHP 8.2.26, and topthink/think-multi-app while switching between framework 8.1.3 and 8.1.4. Compare the routing and application-dispatch behavior between those versions. Done means the / route serves the welcome page on 8.1.4 under the same configuration.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
所属功能组件

路由(Route)

ThinkPHP 版本

8.1.4

操作系统

windows

错误信息

环境信息

项目 内容
框架版本 8.1.4(问题版本) / 8.1.3(正常版本)
PHP 版本 8.2.26
操作系统 Windows
多应用扩展 topthink/think-multi-app
Web 服务器 PHP内置服务器(php think run)

核心配置

// config/app.php
'app_express' => true,      // 开启应用快速访问
'default_app' => 'index',    // 默认应用为 index

// config/route.php
'url_route_must' => false,     // 未启用强制路由

目录结构

app/
├── admin/              # 存在
├── common/             # 存在
├── tools/              # 存在
└── index/              # ❌ 不存在

route/
└── welcome.php           # 定义了 Route::view('/', 'welcome', [...])

问题现象

v8.1.3(正常)
  • 访问 http://localhost:8000/ → 正常显示欢迎页
  • 路由正常工作
v8.1.4(问题)
  • 访问 http://localhost:8000/ → 404 错误
  • 相同配置、相同代码、相同目录结构

路由定义

// route/welcome.php
Route::view('/', 'welcome', [
    'title' => '欢迎页',
]);
其它说明
  Id CommandLine
  -- -----------
// 默认安装最新版
   1 composer install
   2 php think run
   3 pwd
   4 php think run
   5 php think run -p 8003
// 不能访问首页,输出空白
   7 rm .\vendor\
   8 rm .\composer.lock
   9 composer require topthink/framework:v8.1.3
  10 php think run -p 8003
// 可以访问首页
  13 rm .\composer.lock
  14 rm .\vendor\
  15 composer require topthink/framework:v8.1.4

  16 php think run -p 8003
//不可以访问首页
  17 rm .\vendor\
  18 rm .\composer.lock
  19 composer require topthink/framework:v8.1.3
  20 php think run -p 8003
// 可以访问首页

Lingua principale
PHP
Stelle
2.8k
Fork
1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di top-think/framework

Tutte le issue di top-think/framework

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.