简体   繁体   中英

Slim3 error. Can't find class

I'm trying to make my slim3 application work on my VPS, but so far, I've had no luck. It works 100% on my windows machine, but when I move it to my Ubuntu 16.04 VPS, it is not working. I get this message "Message: Class 'app\\views\\auth\\Auth' not found" . The problem is, that I have no clue what is wrong. The class name is correct, and namespaces etc. are also correct. Feel free to ask me any questions you might have, in order to help me.

My container looks like this:

$container['auth'] = function($container) {
    return new \App\views\Auth\Auth;
  };

My composer.json

{
    "require": {
        "slim/slim": "^3.0",
        "slim/twig-view": "^2.2",
        "illuminate/database": "^5.4",
        "Respect/Validation": "^1.1",
        "slim/csrf": "^0.8.1",
        "slim/flash": "^0.2.0",
        "phpmailer/phpmailer": "^5.2"
    },
    "autoload": {
      "psr-4": {
        "App\\": "app"
      }
    }
}

我建议您在项目目录中本地安装composer,这将对您有所帮助。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM