file_get_contents()
기능과 관련하여 도움이 필요합니다.히브리 문자열로 file_get_contents 사용
일부 히브리어 문자가 포함 된 URL에서 데이터를 가져 오려고 할 때 호스트 (잘못된 링크)에서 오류가 발생합니다. 예를 들어
:
file_get_contents('http://domain.com/page/עברית');
나를 위해 작동하지 않습니다.
file_get_contents()
기능과 관련하여 도움이 필요합니다.히브리 문자열로 file_get_contents 사용
일부 히브리어 문자가 포함 된 URL에서 데이터를 가져 오려고 할 때 호스트 (잘못된 링크)에서 오류가 발생합니다. 예를 들어
:
file_get_contents('http://domain.com/page/עברית');
나를 위해 작동하지 않습니다.
Url에는 UTF-8 문자를 사용할 수 없습니다. 먼저 URL로 인코딩해야합니다. 브라우저에 UTF-8 문자로 표시 될 수도 있지만, 브라우저에서보기에 더 예쁘게 보입니다.
When a new URI scheme defines a component that represents textual
data consisting of characters from the Universal Character Set [UCS],
the data should first be encoded as octets according to the UTF-8
character encoding [STD63]; then only those octets that do not
correspond to characters in the unreserved set should be percent-
encoded. For example, the character A would be represented as "A",
the character LATIN CAPITAL LETTER A WITH GRAVE would be represented
as "%C3%80", and the character KATAKANA LETTER A would be represented
as "%E3%82%A2".
오류는 무엇을 말하는가? utf8_encode를 사용해 보셨습니까? – Jonast92
히브리어 문자에서 URL 인코딩이 작동합니까? – ajreal
URL이 브라우저에서 작동하지 않습니다. – MatRt