Questions tagged «symfony-config-component»

5
如何获取Symfony2应用程序的根目录?
从控制器内部获取根应用程序目录的最佳方法是什么?是否可以在控制器外部获取它? 现在,我通过将其(从参数)作为参数传递给服务来获得它,如下所示: services: sr_processor: class: Pro\Processor arguments: [%kernel.root_dir%] 在Symfony2中是否有更好,更简单的方法来获取此信息?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.