zendframework3

1、开发时关闭cache,正式上线后打开cache

application config file (config/application.config.php),  disable this cache

remove config/development.config.php.dist configuration file

或者使用composer development-enable 开启开发模式

$ composer development-enable  # enable development mode
$ composer development-disable # disable development mode
$ composer development-status  # whether or not development mode is enabled

生产运营时,关闭开发模式
set the display_not_found_reason and display_exceptions parameters to false in production systems in module.config.php

2、autoload

新添加module时,编辑composer.json  change autoload section;

using Composer's autoloading capabilities. As such, we need to inform Composer of our new namespace, and where its files live.

"autoload": {
    "psr-4": {
        "Application\\": "module/Application/src/"
    }
},
composer dump-autoload



posted on   yipianchuyun  阅读(382)  评论(0编辑  收藏  举报

努力加载评论中...

导航

点击右上角即可分享
微信分享提示