PHP composer autoloader does'nt work on production server

[亡魂溺海] 提交于 2019-12-24 17:17:27

问题


I implemented an autoloader. Locally, everything works fine, but once i upload it to the production server, all classes are not found.

{
    "require": {
        "facebook/php-sdk": "@stable",
        "everyman/neo4jphp": "dev-master",
        "predis/predis": "1.0.1",
        "aws/aws-sdk-php": "2.*"
    },

    "autoload": {
        "psr-0": {
            "PicoCore\\": "",
            "PicoCore\\Authentication\\" : "PicoCore/authentication",
            "PicoCore\\Aws\\" : "PicoCore/aws",
            "PicoCore\\Cache\\" : "PicoCore/cache",
            "PicoCore\\Database\\" : "PicoCore/database",
            "PicoCore\\Database\\Managers\\" : "PicoCore/database/managers",
            "PicoCore\\Facebook\\" : "PicoCore/facebook",
            "PicoCore\\Objects\\" : "PicoCore/objects",
            "PicoCore\\Rest\\" : "PicoCore/rest",
        "PicoCore\\Configuration\\" : "PicoCore/configuration",
            "PicoCore\\Configuration\\Api\\" : "PicoCore/configuration/api",
            "PicoCore\\Configuration\\PictureReceiver\\" : "PicoCore/configurat$
            "PicoCore\\Configuration\\PictureUploader\\" : "PicoCore/configurat$
            "PicoCore\\Scripts\\" : "PicoCore/scripts",
            "PicoCore\\Times" : "PicoCore/times"
        }
    }
}

I read here composer autoload not working on production server that maybe it because of the \. Is it correct ? And if so, where do i put this funciton?

来源:https://stackoverflow.com/questions/30889845/php-composer-autoloader-doesnt-work-on-production-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!