2016-06-01 1 views
0

콘텐츠 유형을 보낼 때 PHP (또는 apache)가 charset = utf-8을 Content-type 판독기에 자동으로 추가하지 않도록하려면 어떻게해야합니까?헤더에 문자 세트를 설정하지 마십시오

orange public$ cat test.php 
<?php 

header('Content-Type: text/xml'); 
orange public$ curl -v example.com.orange.me.local/test.php 
#* Trying 10.0.0.1... 
* Connected to example.com.orange.me.local (10.0.0.1) port 80 (#0) 
> GET /test.php HTTP/1.1 
> Host: example.com.orange.imi.local 
> User-Agent: curl/7.47.0 
> Accept: */* 
> 
< HTTP/1.1 200 OK 
< Date: Wed, 01 Jun 2016 16:24:49 GMT 
< Server: Apache/2.4.18 (Ubuntu) 
< Content-Length: 0 
< Content-Type: text/xml;charset=UTF-8 
< 
* Connection #0 to host example.com.orange.me.local left intact 
+3

아마도 그쪽으로 utf-8은 99 %의 경우에서 더 좋은 방법이기 때문에 Internet Explorer *에서 어떤 종류의 문제가 있는지 확인하는 것이 좋습니다. – Alex

+0

그것은 프록시 종류의 앱입니다. 그래서 헤더를 보내고 싶습니다. 당신이 기본적으로 옳은 반면, 나는 이것이이 경우에 유효한 접근이라고 생각합니다. – Alex

+0

프록시인지 여부는 중요하지 않습니다. 나는 지금까지 좋은 이유를 볼 수 없습니다. – Alex

답변

0

내가

ini_set('default_charset', ''); 
내 스크립트에

AddDefaultCharset off 

에서를 사용하여 캐릭터 세트를 제거 할 수 있었다 (이유는 Internet Explorer에서 문제를 일으키는 것입니다) 내 .htaccess

관련 문제