【发布时间】:2013-06-20 11:12:05
【问题描述】:
我正在关注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;
}
}
当尝试提供不正确的网址时,例如
localhost/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,
));
我该如何解决这个问题?谢谢。
【问题讨论】:
标签: php kohana kohana-3.3