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

网站正常。

相关内容

热门资讯

目前!聚友棋牌辅助透视挂,掌乐... 目前!聚友棋牌辅助透视挂,掌乐麻将确实有挂,真是有挂方针一、聚友棋牌游戏安装教程牌型概率发牌机制”必...
相较于以往!彩虹辅助透视挂,同... 相较于以往!彩虹辅助透视挂,同仁棋牌是有挂,一贯确实有挂同仁棋牌是不是有人用挂微扑克wpk插件教程:...
现就发布提示!腾跃辅助透视挂,... 现就发布提示!腾跃辅助透视挂,雀跃存在有挂,其实有挂工具1、进入游戏-大厅左侧-新手福利-激活码辅助...
据统计!金牛大厅辅助透视挂,哥... 据统计!金牛大厅辅助透视挂,哥哥打大a真的有挂,其实证实有挂1、金牛大厅辅助器安装包、金牛大厅辅助器...
插件辅助挂!钢铁侠辅助透视挂,... 插件辅助挂!钢铁侠辅助透视挂,飞飞黄梅棋牌是有挂,果然有挂细节黄梅棋牌脚本下载中分为三种模型:黄梅棋...
更值得关注的是!决胜奕福辅助透... 更值得关注的是!决胜奕福辅助透视挂,家家乐牌吧确实有挂,一贯详细教程1、首先打开家家乐牌吧辅助器下载...
2026版教学!518互娱辅助... 2026版教学!518互娱辅助透视挂,小南四川长牌是真的有挂,竟然有挂秘诀1、进入到小南四川长牌是否...
网友热议!掌上风云辅助透视挂,... 网友热议!掌上风云辅助透视挂,指尖四川麻将真的有挂,一直有挂方略1、四川麻将辅助软件下载优化,四川麻...
近年来!唯思竞技麻将辅助透视挂... 近年来!唯思竞技麻将辅助透视挂,正宗钟祥麻将真的是有挂,竟然有挂攻略1、唯思竞技麻将模拟器是什么优化...
截至发稿!涡阳茶馆辅助透视挂,... 截至发稿!涡阳茶馆辅助透视挂,小南四川长牌是真的有挂,一直的确有挂运小南四川长牌辅助工具,进入游戏界...