简体   繁体   English

[Codeigniter] 将 2.0 放入文件夹 1.7 时找不到错误 404

[英][Codeigniter]Error 404 not found when put 2.0 in folder 1.7

I got problem when I use multiple web by put CI 2.0 in the folder that use CI like this当我使用多个 web 时遇到问题,将 CI 2.0 放在使用 CI 的文件夹中,像这样

I implement with CI 1.7 as http://www.domain.com/webci17/webci20 domain.com use normal php code not use framework.我使用 CI 1.7 实现http://www.domain.com/webci17/webci20 domain.com 使用普通 php 代码不使用框架。 webci17 use CI 1.7 to implement webci20 use CI 2.0 to implement I can access to www.domain.com/webci17 webci17 使用 CI 1.7 实现 webci20 使用 CI 2.0 实现 我可以访问 www.domain.com/webci17

but when I acces to www.domain.com/webci17/webci20但是当我访问 www.domain.com/webci17/webci20

It's will redirect to 404 not found page I check by edit index.php in webci20 to any text it's change display as I change but when change back to default CI index.php it redirect to 404 not found page again.它将重定向到 404 未找到页面我通过编辑 index.php 在 webci20 中检查到任何文本,当我更改时它会更改显示,但是当更改回默认 CI 索引时。php 它再次重定向到 404 未找到页面。 I'm not sure it involve version of CI but i think not.我不确定它是否涉及 CI 版本,但我认为不会。 Anyone can solve this problem?任何人都可以解决这个问题? Thank you.谢谢你。

By doing this way (if I get your answer correctly) you're telling the CI1.7 installation (which grabs the url and interprets it) to look for a controller named "webci17" and a method called "webci20" (assuming you didn't do any remap).通过这样做(如果我得到你的答案正确),你告诉 CI1.7 安装(它抓住 url 并解释它)寻找一个名为“webci17”的 controller 和一个名为“webci20”的方法(假设你没有'不要做任何重新映射)。 Of course you're getting the 404 not found error.当然,您会收到 404 not found 错误。

You surely can have 2 different installation on the same server, even if of different version, but you achieve this by separating the folders (and settings the respective variable), as clearly indicated in the user guide: managing_apps您当然可以在同一台服务器上进行 2 个不同的安装,即使版本不同,但您可以通过分离文件夹(并设置相应的变量)来实现这一点,如用户指南中明确指出的那样: managing_apps

If you're looking to integrate something in your installation, as if it were another CI install, you could take into account using the HMVC implementation codeigniter modular extension but it's a different story and I higlhy doubt it will work with 2 different versions of CI (many functions have been renamed and/or suppressed in the latest version).如果你想在你的安装中集成一些东西,就好像它是另一个 CI 安装一样,你可以考虑使用 HMVC 实现codeigniter 模块化扩展,但这是一个不同的故事,我怀疑它是否适用于 2 个不同版本的 CI (许多功能已在最新版本中重命名和/或抑制)。

You could, also, try upgrading to the latest version (2.0.2), you can find informations on how to do it in their forum (for. ex, look at this thread )您也可以尝试升级到最新版本(2.0.2),您可以在他们的论坛中找到有关如何执行此操作的信息(例如,查看此线程

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

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