【问题标题】:Kohana 2 deleted page warningKohana 2 删除页面警告
【发布时间】:2012-05-25 02:18:27
【问题描述】:

我在我的管理面板上使用 Kohana 2。但是当点击 Add New 按钮时,得到 Page Not Found 警告。

它的警告:

The requested page was not found. It may have moved, been deleted, or archived.

panel/system/core/Kohana.php [842]:

The page you requested, admin/corporate/addnew, could not be found.

那是 842。行:

throw new Kohana_404_Exception($page, $template);

那个警告页面图片:

【问题讨论】:

  • 你能告诉我们你的corporate控制器吗?你有一个addnew 方法,对吧?还是您要将此路线重定向到另一个位置?

标签: php database kohana kohana-2


【解决方案1】:

除非您有一个路由设置来处理这个特定的 URL,否则默认路由不会处理这个。 url“admin/corporate/addnew”正在尝试使用管理控制器、公司操作和一个名为“addnew”的 id。我不确定你的应用程序是如何构建的,但也许你需要在 bootstrap.php 中编写一个看起来像这样的路由:

Route::set('admin_corporate', 'admin/corporate(/<action>(/<id>))')
    ->defaults(array(
        'controller' => 'corporate',
        'action'     => 'index'
    ));

这需要在您的默认路线之前进行。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-09-27
    • 2021-08-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-12-21
    相关资源
    最近更新 更多