Cakephp 无法识别 PagesController.php

发布于 2024-12-12 05:03:58 字数 889 浏览 0 评论 0原文

我已经在我的项目中安装了 cakephp2.0,但现在我以前在 1.3 中工作的所有工作都不再在 2.0 中工作。

例如,PagesController 未被识别。当我转到索引页时,收到一条错误消息,指出

Notice (8): Undefined index:  controller [CORE/Cake/Routing/Dispatcher.php, line 84]

Warning (512): _cake_core_ cache was unable to write 'cake_dev_en-us' to Apc cache [CORE/Cake/Cache/Cache.php, line 310]

Warning (512): _cake_core_ cache was unable to write 'cake_dev_en-us' to Apc cache [CORE/Cake/Cache/Cache.php, line 310]

Missing Controller

Error: Controller could not be found.

Error: Create the class Controller below in file: app/Controller/Controller.php

<? php
class Controller extends AppController {
}

Notice: If you want to customize this error message, create app/View/Errors/missing_controller.ctp 

我没有 Controller.php,但有 PagesController.php。我希望我的应用程序识别页面而不是 Controller.php

如何强制它查找页面而不是 Controller.php?谢谢!

I've installed cakephp2.0 in my project but now all my work that used to work in 1.3 no longer works in 2.0.

For example, the PagesController is not being recognized. When I go to my index page, I get an error stating that

Notice (8): Undefined index:  controller [CORE/Cake/Routing/Dispatcher.php, line 84]

Warning (512): _cake_core_ cache was unable to write 'cake_dev_en-us' to Apc cache [CORE/Cake/Cache/Cache.php, line 310]

Warning (512): _cake_core_ cache was unable to write 'cake_dev_en-us' to Apc cache [CORE/Cake/Cache/Cache.php, line 310]

Missing Controller

Error: Controller could not be found.

Error: Create the class Controller below in file: app/Controller/Controller.php

<? php
class Controller extends AppController {
}

Notice: If you want to customize this error message, create app/View/Errors/missing_controller.ctp 

I dont have Controller.php but I do have PagesController.php. I want my app to recognize the Pages not the Controller.php

How can force it to look for Pages and not Controller.php? Thanks!

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

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

发布评论

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

评论(2

〆凄凉。 2024-12-19 05:03:58

您需要将项目迁移到 2.0,或者只坚持使用 cake 1.3。

http://book.cakephp.org/2.0/en /appendices/2-0-migration-guide.html

You need to either migrate your project to 2.0, or just stick with cake 1.3.

http://book.cakephp.org/2.0/en/appendices/2-0-migration-guide.html

不再见 2024-12-19 05:03:58

我可以修复错误:通知 (8):未定义索引:控制器 [CORE/Cake/Routing/Dispatcher.php,第 84 行]。
当在 Config/routes.php 中添加此行时

CakePlugin::routes();

require CAKE . 'Config' . DS . 'routes.php';

I can fix error : Notice (8): Undefined index: controller [CORE/Cake/Routing/Dispatcher.php, line 84].
when add this lines in Config/routes.php

CakePlugin::routes();

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