[eluser]pallavi312[/eluser]
hello,
i m trying code to to download excel file.
so i included file.
i have enabled hook=true in config file.
then in hook folder i created one file "Myclasses.php"
code of file like this
<?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
class Myclasses
{
/**
* includes the directory application\my_classes\Classes in your includes directory
*
*/
function index()
{
//includes the directory application\my_classes\Classes\
ini_set('include_path', ini_get('include_path').';'.BASEPATH.'application/my_classes/Classes/');
}
}
?>
in controller (admin_panel) i have written
$this->load->library('session');
but when i create object of my excel file in model like this
function testexcel($userid)
{
include 'PHPExcel.php';
echo date('H:i

') . " Create new PHPExcel object\n";
$objPHPExcel = new PHPExcel();
echo date('H:i

') . " Set properties\n";
$objPHPExcel->getProperties()->setCreator("BazZ");
}
when i run it gives me error like this
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at C:\Program Files\Apache Group\Apache2\htdocs\Mysimpleprofit\system\application\hooks\MyClasses.php:16)
Filename: libraries/Session.php
Line Number: 662
pls help me how to resolve such error...Its urgent.