PHP Error

PHP Error

Cannot modify header information - headers already sent by (output started at /home/youknowme/domains/youknowme.ru/public_html/protected/controllers/frontend/FileController.php:45)

/home/youknowme/domains/youknowme.ru/public_html/protected/controllers/frontend/FileController.php(6)

01 <?php
02 class FileController extends FrontEndController
03 {
04     public function actionIndex()
05     {
06         header ("Cache-Control: must-revalidate, post-check=0, pre-check=0");
07         header("Cache-Control: private", false);
08         header('Content-Description: File Transfer');
09         header('Content-Type: application/octet-stream');
10 
11         switch($_GET['fname'])
12         {
13                     case 'application/pdf':
14                         $header = '';
15                         break;
16                     case 'application/msword':
17                         $header = '-doc';
18                         break;

Stack Trace

#0
+
 /home/youknowme/domains/youknowme.ru/public_html/protected/controllers/frontend/FileController.php(6): header("Cache-Control: must-revalidate, post-check=0, pre-check=0")
01 <?php
02 class FileController extends FrontEndController
03 {
04     public function actionIndex()
05     {
06         header ("Cache-Control: must-revalidate, post-check=0, pre-check=0");
07         header("Cache-Control: private", false);
08         header('Content-Description: File Transfer');
09         header('Content-Type: application/octet-stream');
10 
11         switch($_GET['fname'])
#8
+
 /home/youknowme/domains/youknowme.ru/public_html/protected/behaviors/WebApplicationEndBehavior.php(27): CApplication->run()
22         // обрабатываем событие создания модуля
23 
24         $this->onModuleCreate = array($this, 'changeModulePaths');
25         $this->onModuleCreate(new CEvent ($this->owner));
26 
27         $this->owner->run();
28     }
29 
30     // обработчик события onModuleCreate
31 
32     public function onModuleCreate($event)
#12
+
 /home/youknowme/domains/youknowme.ru/public_html/index.php(13): CWebApplication->runEnd("frontend")
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11 
12 require_once($yii);
13 Yii::createWebApplication($config)->runEnd('frontend');
2017-07-26 11:28:41 Apache Yii Framework/1.1.7