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

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -