Код:
public function action_top()
{
$id = $this->request->param('id');
$this->response->body($content);
$this->tpl->content = View::factory('charts/top');
}
в первом так попробуй
насчет второго чуток не доконца разобрался смотри
http://thesupport.info/files/ пример
и вот так
http://thesupport.info/files/wefwefно когда заходишь так
http://thesupport.info/wefwef/wef/fewf показывает как я и задумал
если вдруг кто-то знает проблему был бы не против помощи)
============
если что вот
============
в бутстрап (в конец)
set_exception_handler(array('Exceptionhandler', 'handle'));
потом новый контроллер
Код:
<?php defined('SYSPATH') or die('No direct script access.');
class Exceptionhandler
{
public static function handle(Exception $e)
{
switch (get_class($e))
{
case 'HTTP_Exception_403':
$response = new Response;
$response->status(403);
$view = new View('error403');
$view->message = $e->getMessage();
echo $response->body($view)->send_headers()->body();
return TRUE;
break;
case 'HTTP_Exception_404':
$response = new Response;
$response->status(404);
$view = new View('error404');
$view->message = $e->getMessage();
echo $response->body($view)->send_headers()->body();
return TRUE;
break;
default:
return Kohana_Exception::handler($e);
break;
}
}
}
и
сам вид страницы ошибки
мой к примеру
Код:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Удаленное обучение</title>
<link href="/css/style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="/js/jquery.min.js"></script>
</head>
<body>
<div id="contaner">
<!--Вызов отображение формы логина-->
<?=Request::factory('loginform')->execute()?>
<!-- / Вызов отображение формы логина-->
<div id="header">
<h1 style="text-align: center"><a href="/">Удаленное обучение</a></h1>
</div>
<div id="content">
<h2 style="text-align: center; color:red; font-size:18px;">Доступ запрещен</h2>
<p style="text-align: center">Вернитесь на <a href="/">главную</a>.</p>
</center>
</div>
<div style="clear:both"></div>
<div id="empty"></div>
</div>
<div id="footer">
<hr>
<p style="padding-top:5px">© 2012</p>
</div>
</body>
<? if (isset($_GET['d'])) {?>
<div id="kohana-profiler">
<?=View::factory('profiler/stats')?>
</div>
<?}?>
</html>