Русскоязычный форум, посвященный фреймворку Kohana
http://forum.kohanaframework.su/

Вопрос по headers
http://forum.kohanaframework.su/viewtopic.php?f=31&t=222
Страница 1 из 1

Автор:  websto [ 18 июн 2012, 14:45 ]
Заголовок сообщения:  Вопрос по headers

Всем привет!Может кто знает как отправлять в Kohane headers заголовки.Делаю так в базовом контролере

Request::current()->headers('Content-Type', 'text/html;charset=utf-8');
Request::current()->headers('Cache-Control', 'no-store, no-cache,
must-revalidate, post-check=0, pre-check=0');
Request::current()->headers('Pragma', 'no-cache');

но почему-то не проходит!

Автор:  Sergey [ 30 июл 2012, 03:35 ]
Заголовок сообщения:  Re: Вопрос по headers

websto писал(а):
Всем привет!Может кто знает как отправлять в Kohane headers заголовки.


Код:
class Controller_Welcome extends Controller {
  public function action_index()
  {
    $this->response->headers(array(
      'Content-Type'   => 'text/html;charset=utf-8',
      'Cache-Control'  => 'no-store, no-cache,must-revalidate,post-check=0,pre-check=0',
      'Pragma'         => 'no-cache'
    ));
  }
}


Не работает?

Страница 1 из 1 Часовой пояс: UTC + 4 часа [ Летнее время ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/