Symfony2, How to change environment?

后端 未结 2 596
执念已碎
执念已碎 2021-02-08 11:42

I have read a lot about the clear cache command for symfony2, but I have this question :

Is php app/console cache:clear --env=prod with --env,

2条回答
  •  梦毁少年i
    2021-02-08 12:03

    To change the environment you've to change your front controller. Symfony2 provide by default three environments and a front controller for each one of them with a specific configuration files > See more

    When you execute cache:clear command for a specific environment, it just clears the cache for the given environment. To change your environment, you've just to change your front controller (app.php / app_dev.php / app_test.php)

    You can also create new environments with a specific configuration

提交回复
热议问题