1

我在我的管理面板上使用 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);

该警告页面图片:

在此处输入图像描述

4

1 回答 1

0

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

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

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

于 2012-10-23T05:45:44.307 回答