我正在尝试在我的 app/autoload.php 中使用 registerPrefixes() 但我收到以下错误:
Fatal error: Class 'Symfony\Component\ClassLoader\UniversalClassLoader'
not found in C:\wamp\www\ProjetJidal\app\autoload.php on line 6
这是我的 autoload.php:
<?php
use Doctrine\Common\Annotations\AnnotationRegistry;
$loader = require __DIR__.'/../vendor/autoload.php';
$loader->registerPrefixes(array(
'Html2Pdf_' => __DIR__.'/../vendor/html2pdf/lib',
));
// intl
if (!function_exists('intl_get_error_code')) {
require_once __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php';
}
AnnotationRegistry::registerLoader(array($loader, 'loadClass'));
return $loader;
感谢您的帮助,谢谢!