我正在使用Symfony2,正在使用SVN。所以问题是我的代码运行正常。当我提交代码并在另一台笔记本电脑中更新并运行代码时,它给了我这样的错误

FileLoaderLoadException: Cannot load resource "."


当我清除缓存时,我得到了这个错误

 [Symfony\Component\Config\Exception\FileLoaderLoadException]
 Cannot load resource ".".


我不知道真正的问题是什么。
我通过此命令安装资产

php app/console assets:install web


但仍然是相同的问题。如何解决此错误。

routing.yml

admin:
    resource: '@SonataAdminBundle/Resources/config/routing/sonata_admin.xml'
    prefix: /admin

_sonata_admin:
    resource: .
    type: sonata_admin
    prefix: /admin

sonata_user:
    resource: '@SonataUserBundle/Resources/config/routing/admin_security.xml'
    prefix: /admin

sonata_user_security:
    resource: "@SonataUserBundle/Resources/config/routing/sonata_security_1.xml"

sonata_user_resetting:
    resource: "@SonataUserBundle/Resources/config/routing/sonata_resetting_1.xml"
    prefix: /resetting

sonata_user_profile:
    resource: "@SonataUserBundle/Resources/config/routing/sonata_profile_1.xml"
    prefix: /profile

sonata_user_register:
    resource: "@SonataUserBundle/Resources/config/routing/sonata_registration_1.xml"
    prefix: /register

sonata_user_change_password:
    resource: "@SonataUserBundle/Resources/config/routing/sonata_change_password_1.xml"
    prefix: /profile


gallery:
    resource: '@SonataMediaBundle/Resources/config/routing/gallery.xml'
    prefix: /media/gallery

media:
    resource: '@SonataMediaBundle/Resources/config/routing/media.xml'
    prefix: /media

最佳答案

您是否提交了文件夹缓存? (你不能)

当我始终部署时,我在项目中使用SVN

svn update
cache:clear --env=prod
assets:install
assetic:dump


很好(您可以使用phing进行计算机化)

关于symfony - FileLoaderLoadException:无法加载资源“。”,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/22854958/

10-12 05:11