Slim working on localhost but gives "Fatal error: class not found" on shared host

Slim working on localhost but gives "Fatal error: class not found" on shared host

我正在使用 Slim 3 创建一个应用程序。在本地主机 (xampp) 中一切正常,但是当我在我的共享主机上尝试相同的应用程序时,每个使用 use 调用的 class 都会得到 "fatal error: class not found" .示例:

登录路径

use \App\Middlewares\ValidationMiddleware;

$app->get('/login', 'AuthController:getSignIn')->setName('login')
->add($container->csrf)
->add(new ValidationMiddleware($container));

我明白了

Fatal error: Class 'App\Middlewares\ValidationMiddleware' not found

但是 class 在那里并且在本地主机中它可以工作。

检查所有目录和文件的大小写是否正确。

对于 linux 名称为 Abc 的目录或文件与 abc 不同,但对于 windows 则等于