Codeigniter 404 状态标头没有任何原因

发布于 2024-10-06 16:18:48 字数 113 浏览 0 评论 0原文

大家好 我有一个控制器,它调用一个模型,该模型在数据库查询后返回一个数组到我的视图,该视图打印一些我可以在浏览器中看到的 json。问题是该页面无缘无故地有一个 404 状态标头。

有什么建议吗?

Hello all
I have a controller which calls a model which returns after a db query an array to my view which prints some json which i can see in my browser.The problem is that this page has a 404 status header for no reason.

Any suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

╰つ倒转 2024-10-13 16:18:48

不应该存在的页面通常会在 CodeIgniter 中发送 404 标头。

您可以执行以下操作之一

  • 检查您的控制器/方法是否存在
  • 检查您是否有任何可能将您指向另一个控制器/方法的路由
  • 检查该位置是否可以通过浏览器浏览

如果没有任何效果,最好是您发布了一些可能有帮助的代码、路由等。

A page that shouldn't exist is often sends a 404 header in CodeIgniter.

You could do one of the following

  • Check if you the controller/method exists
  • Check if you have any routing that may be pointing you to another controller/method
  • Check if that location can be browsed via a browser

If nothing works, it would be better if you posted some of your code, routing, etc that may help.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文