PHP ile Unicode kullanma

2 Cevap php

Nasıl Unicode PHP ile kullanabilirim?

I variable bir PHP Unicode değeri saklamak istiyorum ama bu çıkışı bazı question marks.

Nedir solution?

2 Cevap

Php.ini 'de:

default_charset = "UTF-8"
mbstring.internal_encoding = "UTF-8"

; overload(replace) single byte functions by mbstring functions.
; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(),
; etc. Possible values are 0,1,2,4 or combination of them.
; For example, 7 for overload everything.
; 0: No overload
; 1: Overload mail() function
; 2: Overload str*() functions
; 4: Overload ereg*() functions
mbstring.func_overload = 4

çıkış kodlama utf8 olduğundan emin olun

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

PS bazı cevapları kabul.