我正在关注http://kohanaframework.org/3.3/guide/kohana/tutorials/error-pages上的Kohana 3.3教程
以下代码位于classes/http/exception/404.php
<?php
class HTTP_Exception_404 extends Kohana_HTTP_Exception_404 {
public function get_response(){
$view = View::factory('errors/404');
$view->message = $this->getMessage();
$response = Response::factory()
->status(404)
->body($view->render());
return $response;
}
}
尝试提供不正确的网址时,例如
本地主机/myapp/xyz
出现以下错误
ErrorException [ Parse Error ]:
APPPATH\classes\http\exception\404.php [ 3 ]
1 <?php
2 class HTTP_Exception_404 extends Kohana_HTTP_Exception_404 {
3
4
5
6
7
8
{PHP internal call} » Kohana_Core::shutdown_handler()
在bootstrap.php中,init 的代码是
Kohana::init(array(
'base_url' => '/myapp/',
'errors' => TRUE,
'index_file' => FALSE,
));
我怎样才能解决这个问题?谢谢。