gpt4 book ai didi

php - 自动加载器类 "Zend\Loader\ClassMapAutoLoader"未加载

转载 作者:行者123 更新时间:2023-12-01 16:26:49 25 4
gpt4 key购买 nike

我正在使用 PHP 5.5.12 编写 Zend Framework 2.3.1 应用程序

我的应用程序包含多个模块,并且在每个模块的 Module.php 中我都有

public function getAutoloaderConfig()
{
return array(
'Zend\Loader\ClassMapAutoLoader' => array(
__DIR__ . '/autoload_classmap.php'
),
'Zend\Loader\StandardAutoloader' => array(
'namespaces' => array(
__NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
),
),
);
}

这是我看到的与 ClassMapAutoLoader 相关的唯一迹象。

当我尝试运行应用程序时,我得到:

Fatal error: Uncaught exception 'Zend\Loader\Exception\InvalidArgumentException' with message 'Autoloader class "Zend\Loader\ClassMapAutoLoader" not loaded' in /mnt/storage/home/ufk/work-projects/global-logic/project/xpogames/vendor/zendframework/zendframework/library/Zend/Loader/AutoloaderFactory.php on line 85

有什么想法吗?

最佳答案

我遇到了和你一样的问题,我找出了导致问题的原因:

'Zend\Loader\ClassMapAutoLoader' => array(
__DIR__ . '/autoload_classmap.php'
),

需要:

'Zend\Loader\ClassMapAutoloader' => array(
__DIR__ . '/autoload_classmap.php'
),

自动加载器中的小L。我们都在不该这么做的时候陷入了困境。这为我澄清了。让我知道它是否适合您。

关于php - 自动加载器类 "Zend\Loader\ClassMapAutoLoader"未加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23721178/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com