codeigniter - mb_convert_encoding() function is not working in php -


i using library (glocery_crud) in codigniter convert database table csv , working fine on localhost on live server showing me blank page , not creating csv file .

here code -:

    // convert utf-16le , prepend bom     $string_to_export = "\xff\xfe" .mb_convert_encoding($string_to_export, 'utf-16le', 'utf-8');     $filename = "export-".date("y-m-d_h:i:s").".csv";     header('content-type: application/csv;charset=utf-16le');     header('content-disposition: attachment; filename='.$filename);     header("cache-control: no-cache");     echo $string_to_export;     die(); 

if commenting first line geting csv file not formatted in csv () -:

 testing9988312003sdgsgsdgsgvipul@gmail.comsdgfrayear 

it works fine $string_to_export = "\xff\xfe".iconv("utf-8","ucs-2le",$string_to_export);


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -