Characters like à not displaying correctly from MySQL

后端 未结 3 1389
长发绾君心
长发绾君心 2020-12-07 04:35

I have a problem when displaying results from a database in an HTML file in two computers.

So, in one computer it shows a name like this:

SAUL FRANCI         


        
3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-07 05:01

    You could set PHP to output the content as UTF-8:

    header('Content-Type: text/html; charset=utf-8');

    In your HTML document you can specify to the browsers that the content it is UTF-8, by putting this in the HEAD of your pages:

提交回复
热议问题