TP6首页加载报错 Call to a member function run() on null

编程入门 行业动态 更新时间:2024-10-27 04:30:04

TP6首页加载<a href=https://www.elefans.com/category/jswz/34/1771188.html style=报错 Call to a member function run() on null"/>

TP6首页加载报错 Call to a member function run() on null

最近新接入一个二开的项目,tp6的项目内置的composer.json文件里引入的topthink框架包文件却是"topthink/framework": "5.0.*",导致了以下错误:

错误

Fatal error: Uncaught Error: Call to a member function run() on null in /www/wwwroot/www.test/public/index.php:29 Stack trace: #0 {main} thrown in /www/wwwroot/www.test/public/index.php on line 29

解决

修改composer.json文件如下:

{"name": "topthink/think","description": "the new thinkphp framework","type": "project","keywords": ["framework","thinkphp","ORM"],"homepage": "/","license": "Apache-2.0","authors": [{"name": "liu21st","email": "liu21st@gmail"}],"require": {"php": ">=5.4.0","topthink/framework": "5.0.*","alibabacloud/client": "^1.5"},"autoload": {"psr-4": {"app\\": "application"}},"extra": {"think-path": "thinkphp"},"config": {"preferred-install": "dist"}
}

执行composer update 更新 vendor文件,问题解决。

更多推荐

TP6首页加载报错 Call to a member function run() on null

本文发布于:2023-12-03 13:48:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1656044.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:报错   首页   加载   Call   run

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!