How to create a link to download generated documents in symfony2?

后端 未结 5 1438
别跟我提以往
别跟我提以往 2020-12-15 10:53

Documents are created by the system and saved to the folder /web/downloads. I have created a view to display links which will allow a user to download the files, should the

5条回答
  •  长情又很酷
    2020-12-15 11:57

    Let's make a sample.

    Say your project lives in /www/, so /www/web/ is the document root of your symfony2 application. Now everything you try to access that is in /www/web/ over http://server/ will show up.

    /www/web/downloads/file.zip would be reachable at http://server/downloads/file.zip by default.

提交回复
热议问题