douzhuo1853 2013-02-03 18:21
浏览 65
已采纳

无法使用Zend Framework 2创建静态页面

I'm trying to make a website using the Zend Framework 2, but I have a simple problem driving me crazy.

I'd like to make a simple about-us.html page with static content because there is no need to do anything else than display html.

There is no need to create a Controller / model etc...

  • 写回答

3条回答 默认 最新

  • douzhang8033 2013-02-03 18:36
    关注

    Maybe you have to question why you're using ZF in the first place. If you just want to create a static internet page, do that without a PHP framework!

    If you didn't ask your question well and you're actually just adding a static page to an existing ZF application, why not just using the existing IndexController, add an empty action and add your static content to the corresponding .phtml?

    Alternatively you can look at PhlySimplePage, a ZF2 module for the purpose of adding simple static pages to a ZF app. It's written by Matthew Weier O'Phinney, the lead dev of ZF.

    As the readme says, this module eliminates the need to create a controller and an action. So all you need to do is create a route and a view script.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序
  • ¥15 onvif+openssl,vs2022编译openssl64
  • ¥15 iOS 自定义输入法-第三方输入法
  • ¥15 很想要一个很好的答案或提示
  • ¥15 扫描项目中发现AndroidOS.Agent、Android/SmsThief.LI!tr
  • ¥15 怀疑手机被监控,请问怎么解决和防止
  • ¥15 Qt下使用tcp获取数据的详细操作