UTF-8 characters don't display correctly

前端 未结 7 1192
清酒与你
清酒与你 2020-12-11 02:41

This is my PHP code:



        
7条回答
  •  心在旅途
    2020-12-11 02:49

    try this:

        header('Content-Type: text/html; charset=UTF-8');
        header("Content-type: application/octetstream");
        header("Pragma: no-cache");
        header("Expires: 0");
        //print "$name_field\n$data";
    
        // با این کد درست شد
        print chr(255) . chr(254) . mb_convert_encoding("$name_field\n$data", 'UTF-16LE', 'UTF-8');
    

提交回复
热议问题