PHP致命错误:未捕获错误:在C:\xampp\htdocs\server\pdf中找不到类“Mpdf\Mpdf”。菲律宾:5
堆栈跟踪:
#0{main}
在C:\xampp\htdocs\server\pdf中抛出。php在线5
PHP 8.1.3,PHP Intelephense v1。8.2
康珀。json
{
"require": {
"mpdf/mpdf": "^6.1"
}
}
创作者锁
{
"name": "mpdf/mpdf",
"version": "v6.1.2",
"source": {
"type": "git",
"url": "https://github.com/mpdf/mpdf.git",
"reference": "da078bc2669d3f98553ac41f920ead4c17c951ad"
},
pdf。php
<?php
require_once __DIR__ . '/pdf/autoload.php';
$mpdf = new \Mpdf\Mpdf;
$mpdf->WriteHTML('<h1>Hello world!</h1>');
$mpdf->Output();
我做错了什么?我不明白什么?
谢谢你的帮助!