简体   繁体   English

在ZF2中调用静态页面?

[英]Call Static Page in ZF2?

i want to add pdf file and also video link in my current site. 我想在当前站点中添加pdf文件以及视频链接。 both pdf file and video are static. pdf文件和视频都是静态的。 how can i configure it with my current site .There is no need to add controller and action for it.so i install PhlySimplePage module in vendor folder but cant got any idea how to use it. 我如何在当前站点上配置它。不需要为其添加控制器和操作。因此,我在供应商文件夹中安装了PhlySimplePage模块,但不知道如何使用它。 Thanks in advance. 提前致谢。

The easy way it to put the link link in your view script. 将链接链接放入视图脚本的简单方法。 But please note, that the file has to be in the public folder, and the url has to be abosulute, or relative to /public/. 但请注意,该文件必须位于公用文件夹中,并且网址必须是abosulute,或者相对于/ public /。

Also, you can create a route even for static files, if you want to keep it tidy 另外,如果您要保持整洁,甚至可以为静态文件创建路由

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM