tp8 升级TP框架版本,同时网站打不开,错误代码 ERR_ADDRESS_INVALID,启动内置服务器 运行PHP命令php think run 输出结果是空白
创始人
2025-01-17 01:02:28
0

环境:windows11  phpstudy_pro  thinkphp8.0 php8.2.9  

一、升级TP框架发现php网站打不开,错误提示:错误代码 ERR_ADDRESS_INVALID,但是静态网站可以打开

二、运行命令,输出结果空白

进入composer :

选择composer,再选择对应网站的PHP版本,

启动内置服务器

按上面操作,发现输出结果是空白,没有任何东西

三、启用VSCODE的xdebug调试

在VSCODE中启用调试F5,在think文件中打断点

全部勾上

一直一步一步往下走,发现在提示错误

出现异常。 Fatal error: Uncaught ReflectionException: Class "think\Config" does not exist in E:\phpstudy_pro\WWW\www.jy.com\vendor\topthink\framework\src\think\Container.php:377 Stack trace: #0 E:\phpstudy_pro\WWW\www.jy.com\vendor\topthink\framework\src\think\Container.php(377): ReflectionClass->__construct('think\\Config') #1 E:\phpstudy_pro\WWW\www.jy.com\vendor\topthink\framework\src\think\Container.php(253): think\Container->invokeClass('think\\Config', Array) #2 E:\phpstudy_pro\WWW\www.jy.com\vendor\topthink\framework\src\think\Container.php(132): think\Container->make('think\\Config') #3 E:\phpstudy_pro\WWW\www.jy.com\vendor\topthink\framework\src\think\Container.php(514): think\Container->get('config') #4 E:\phpstudy_pro\WWW\www.jy.com\vendor\topthink\framework\src\think\App.php(524): think\Container->__get('config') #5 E:\phpstudy_pro\WWW\www.jy.com\vendor\topthink\framework\src\think\App.php(450): think\App->load() #6 E:\phpstudy_pro\WWW\www.jy.com\vendor\topthink\framework\src\think\Console.php(105): think\App->initialize() #7 E:\phpstudy_pro\WWW\www.jy.com\vendor\topthink\framework\src\think\Console.php(89): think\Console->initialize() #8 [internal function]: think\Console->__construct(Object(think\App)) #9 E:\phpstudy_pro\WWW\www.jy.com\vendor\topthink\framework\src\think\Container.php(396): ReflectionClass->newInstanceArgs(Array) #10 E:\phpstudy_pro\WWW\www.jy.com\vendor\topthink\framework\src\think\Container.php(253): think\Container->invokeClass('think\\Console', Array) #11 E:\phpstudy_pro\WWW\www.jy.com\vendor\topthink\framework\src\think\Container.php(132): think\Container->make('think\\Console') #12 E:\phpstudy_pro\WWW\www.jy.com\vendor\topthink\framework\src\think\Container.php(514): think\Container->get('console') #13 E:\phpstudy_pro\WWW\www.jy.com\think(10): think\Container->__get('console') #14 {main}  Next think\exception\ClassNotFoundException: class not exists: think\Config in E:\phpstudy_pro\WWW\www.jy.com\vendor\topthink\framework\src\think\Container.php:379 Stack trace: #0 E:\phpstudy_pro\WWW\www.jy.com\vendor\topthink\framework\src\think\Container.php(253): think\Container->invokeClass('think\\Config', Array) #1 E:\phpstudy_pro\WWW\www.jy.com\vendor\topthink\framework\src\think\Container.php(132): think\Container->make('think\\Config') #2 E:\phpstudy_pro\WWW\www.jy.com\vendor\topthink\framework\src\think\Container.php(514): think\Container->get('config') #3 E:\phpstudy_pro\WWW\www.jy.com\vendor\topthink\framework\src\think\App.php(524): think\Container->__get('config') #4 E:\phpstudy_pro\WWW\www.jy.com\vendor\topthink\framework\src\think\App.php(450): think\App->load() #5 E:\phpstudy_pro\WWW\www.jy.com\vendor\topthink\framework\src\think\Console.php(105): think\App->initialize() #6 E:\phpstudy_pro\WWW\www.jy.com\vendor\topthink\framework\src\think\Console.php(89): think\Console->initialize() #7 [internal function]: think\Console->__construct(Object(think\App)) #8 E:\phpstudy_pro\WWW\www.jy.com\vendor\topthink\framework\src\think\Container.php(396): ReflectionClass->newInstanceArgs(Array) #9 E:\phpstudy_pro\WWW\www.jy.com\vendor\topthink\framework\src\think\Container.php(253): think\Container->invokeClass('think\\Console', Array) #10 E:\phpstudy_pro\WWW\www.jy.com\vendor\topthink\framework\src\think\Container.php(132): think\Container->make('think\\Console') #11 E:\phpstudy_pro\WWW\www.jy.com\vendor\topthink\framework\src\think\Container.php(514): think\Container->get('console') #12 E:\phpstudy_pro\WWW\www.jy.com\think(10): think\Container->__get('console') #13 {main}   thrown

参考:TP6.0.3出错Class think\Config does not exist - ThinkPHP框架

造成原因:问题源于composer不是最新版本

解决办法:升级对应网站的composer

进入composer :

选择composer,再选择对应网站的PHP版本,

运行命令

composer update

升级成功后;运行php think run

网站正常。

相关内容

热门资讯

这一现象值得深思!wepoke... 这一现象值得深思!wepoker怎么下载游戏,hhpoker俱乐部是干嘛的,原来真的有挂(有挂细节)...
刚刚!智星菠萝透视,拱趴大菠萝... 刚刚!智星菠萝透视,拱趴大菠萝挂,果然是有挂(有挂规律)1)拱趴大菠萝挂辅助插件:进一步探索拱趴大菠...
这一问题亟待解决!wepoke... 这一问题亟待解决!wepoker怎么挂底牌,wpk辅助购买,真是存在有挂(有挂教学)1、wepoke...
备受关注的!哈糖大菠萝辅助器,... 备受关注的!哈糖大菠萝辅助器,德扑圈透视挂,确实是有挂(有挂教程)1、让任何用户在无需哈糖大菠萝辅助...
围绕透视问题!hhpoker可... 围绕透视问题!hhpoker可以控制吗,约局吧开挂,竟然存在有挂(有挂分享)所有人都在同一条线上,像...
插件辅助挂!pokernow辅... 插件辅助挂!pokernow辅助控制,wepoker好友助力码,果然是真的有挂(证实有挂)1)wep...
黑科技辅助挂!uupoker有... 黑科技辅助挂!uupoker有透视吗,wepokerplus外挂,真是是真的有挂(有挂细节)1、点击...
网友热议!德州之星扫描器,we... 网友热议!德州之星扫描器,wepoker俱乐部辅助,都是是真的有挂(揭秘有挂)1.wepoker俱乐...
黑科技辅助挂!红龙poker有... 黑科技辅助挂!红龙poker有辅助吗,wepoker破解工具,好像确实有挂(有挂辅助)1、在红龙po...
2026版攻略!aapoker... 2026版攻略!aapoker发牌逻辑,德普之星私人局辅助器,一贯真的是有挂(真的有挂)1、完成德普...