UTF-8 problems PHP/MySQL

后端 未结 7 1123
隐瞒了意图╮
隐瞒了意图╮ 2020-12-05 12:08

I\'ve always used ISO-8859-1 encoding, but I\'m now going over to UTF-8.

Unfortunately I can\'t get it to work.

My MySQL DB is UTF-8, my PHP document is enco

相关标签:
7条回答
  • 2020-12-05 12:33

    Nowadays PDO is the recommended way to use mysql. With that you should use the connection string to set encoding. For example: "mysql:host=$host;dbname=$db;charset=utf8"

    0 讨论(0)
提交回复
热议问题