search

Home  >  Q&A  >  body text

Symfony-Why does the directory web/bundles/framework/ not exist?

The framework under web/bundles/ is a file, not a folder. The image path used in DEMO is web/bundles/framework/images/grey_magnifier.png, but it cannot be displayed.

How to solve this problem?

ringa_leeringa_lee2807 days ago544

reply all(2)I'll reply

  • 天蓬老师

    天蓬老师2017-05-16 16:46:28

    In my case framework is a folder, if you use

    php app/console assets:install --symlink
    

    If installed, the framework is a soft connection to FrameworkBundle/Resources/public. It is recommended to re-execute it

    php app/console assets:install --symlink 
    

    Command to try

    reply
    0
  • phpcn_u1582

    phpcn_u15822017-05-16 16:46:28

    I guess you are using a Windows system. Symfony2 will use symbolic links (Linux or Unix) by default. The Windows system does not recognize it, so it will become a file. You can try it

    app/console assets:install web
    

    Copy these resources to the web/bundles directory through hard copy. However, there is a disadvantage of doing this. If you update the css or js (such as website resource files) during the development process, you need to run it again. The command just now will take effect only when the new resources are copied to the web/bundles directory again.

    Personally, I think you should read more official documents of Symfony2. In fact, these contents are mentioned in official documents, so you should read them carefully.

    Hope this helps.

    reply
    0
  • Cancelreply