php Zend / MVC without mod_rewrite(没有 mod_rewrite 的 php Zend/MVC)
问题描述
我在网络上的许多博客中都看到过它,但我认为应该在这里讨论它.当我们在 PHP 中有一个 MVC 框架(我对 ZEND 感兴趣)但我们的主机不提供 mod_rewrite 时,我们该怎么办?有什么捷径"吗?我们可以以任何方式转移控制权(以便页面之间可能发生映射)?有任何想法吗?谢谢:-)
I've seen it mentioned in many blogs around the net, but I believe it shoud be discussed here. What can we do when we have an MVC framework (I am interested in ZEND) in PHP but our host does not provide mod_rewrite? Are there any "short-cuts"? Can we transfer control in any way (so that a mapping may occur between pages)? Any ideas? Thank you :-)
推荐答案
Zend 框架应该可以在没有 mod_rewrite 的情况下工作.如果你能忍受你的 URL:s 看起来更像/path/to/app/index.php/controller/action".如果你有 mod_rewrite,你可以去掉index.php"位,但它也应该可以使用.
Zend framework should work without mod_rewrite. If you can live with your URL:s looking more like "/path/to/app/index.php/controller/action". If you had mod_rewrite you could do away with the "index.php" bit, but it should work with too.
设置路由以接受 index.php 部分就是一个问题.
It's all a matter of setting up the routes to accept the index.php part.
这篇关于没有 mod_rewrite 的 php Zend/MVC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:没有 mod_rewrite 的 php Zend/MVC
基础教程推荐
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- 如何替换eregi() 2022-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
