安装数据库后无法使用

bestyao

问题描述

这里详细描述问题
Windows10,系统,phpstudy环境,php8.2.9,使用composer安装数据库一开始提示缺少openssl,后来一顿操作解决了,但是依然无法使用数据库,提示:“Error: Class "Illuminate\Database\Capsule\Manager" not found in D:\WWW\mycode\webman\webman\vendor\workerman\webman-framework\src\support\Db.php:33” ,完全按照官方手册操作,请问要怎么解决这个问题?

程序代码

这里粘代码

public function db(Request $request)
{
$default_uid = 1;
$uid = $request->get('uid', $default_uid);
$name = Db::table('users')->where('uid', $uid)->value('username');
return response("hello $name");
}

报错信息

这里粘贴报错

Error: Class "Illuminate\Database\Capsule\Manager" not found in D:\WWW\mycode\webman\webman\vendor\workerman\webman-framework\src\support\Db.php:33

截图报错信息里报错文件相关代码

这里粘贴截图
截图
截图
截图

操作系统及workerman/webman等框架组件具体版本

这里写具体的系统环境相关信息
Windows10,系统,phpstudy环境,php8.2.9,webman应该是1.5.0

237 2 0
2个回答

walkor

要么没装成功,要么没按照手册步骤重启webman

  • 暂无评论
TM

phpstudy 8.2版本的php扩展有点问题,可以用他们的8.0版本

  • 暂无评论
🔝