Error: Call to undefined function _()

Notice that our view action takes a parameter: the ID of the post we’d like to see. This parameter is handed to the action through the requested URL. If a user requests /posts/view/3, then the value ‘3’ is passed as $id.

We also do a bit of error checking to ensure that a user is actually accessing a record. If a user requests/posts/view, we will throw a NotFoundException and let the CakePHP ErrorHandler take over. We also perform a similar check to make sure the user has accessed a record that exists.

I followed this instructions remove the $id, the url like this: http://localhost/cakephp/posts/view/

but it didn't throw a NotFoundException, it represent this error:

Fatal Error

Error: Call to undefined function _()
File: D:\Program Files\wamp\www\cakephp\app\Controller\PostsController.php
Line: 14

Why?
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值