How can I fix php-export-data class' header error? -


i use php-export-data class excel output. class works on localhost , godady server on new server in doesn't work.

it gives header error. likes this.:

warning: cannot modify header information - headers sent (output started @ /home/mmm/public_html/head/adminsss/config.php:1) in /home/mmm/public_html/head/adminss/modules/head/class/php-export-data.class.php on line 489      warning: cannot modify header information - headers sent (output started @ /home/mmm/public_html/head/adminsss/config.php:1) in /home/mmm/public_html/head/adminsss/modules/head/class/php-export-data.class.php on line 490<br> line 489 => header("content-type: application/vnd.ms-excel; charset=" . $this->encoding);  line 490 => header("content-disposition: inline; filename=\"" . basename($this->filename) . "\""); 
  • localhost php version 5.5.11
  • godady php version 5.3.24
  • new server php version 5.5.23

how can fix this?

if error message shows first line " /config.php:1 " , must convert php file without bom .

utf-8 bom 

linebreaks , spaces alone can problem. there "invisible" character sequences can cause this. famously utf-8 bom (byte-order-mark) isn't displayed text editors. it's byte sequence ef bb bf, optional , redundant utf-8 encoded documents. php has treat raw output. may show characters  in output (if client interprets document latin-1) or similar "garbage".


Comments