[eluser]Unknown[/eluser]
I'm trying to do this and Actually works but I get the following error "Cannot modify header information - headers already sent by ...system/core/Output.php 276".
What could be wrong in the following code in the controller function (/site/lang_js)?
[code]
function lang_js() {
$this->output->set_header('Cache-Control: no-cache, must-revalidate');
$this->output->set_header('Exprires: Mon, 4 April 1994 04:44:44 GMT');
$this->output->set_header('Content-type: application/x-javascript');
$this->lang->load('messages',$this->session->userdata('language'));
$this->lang->load('user',$this->session->userdata('language'));
echo "var lang = " . json_encode($this->lang->language);
}
[code]
Thanks!