e PHP warning

PHP warning

Cannot modify header information - headers already sent by (output started at /home/eceton/public_html/protected/config/front_main.php:1)

/home/eceton/public_html/protected/controllers/SitemapController.php(69)

57                 $urls[] = [
58                     'loc'=>Yii::app()->createAbsoluteUrl("/$items->restaurant_slug"),
59                     'lastmod'=>Date_Formatter::date($items->date_modified,"yyyy-MM-dd"),
60                     'changefreq'=>"weekly",
61                     'priority'=>"1.0"
62                 ];
63             }
64         }
65 
66         // dump($urls);
67         // die();
68 
69         header('Content-type: text/xml');
70         echo $this->renderPartial('index', array('urls' => $urls), true);
71     }
72 }
73 // end class

Stack Trace

#0
+
 /home/eceton/public_html/protected/controllers/SitemapController.php(69): header("Content-type: text/xml")
64         }
65 
66         // dump($urls);
67         // die();
68 
69         header('Content-type: text/xml');
70         echo $this->renderPartial('index', array('urls' => $urls), true);
71     }
72 }
73 // end class
#8
+
 /home/eceton/public_html/index.php(17): CApplication->run()
12 
13 // remove the following line when in production mode
14 defined('YII_DEBUG') or define('YII_DEBUG',true);
15 
16 require_once($yii);
17 Yii::createWebApplication($config)->run();
2025-06-24 03:19:26 Apache Yii Framework/1.1.30