我收到这样的请求,网址如下所示:http ://domain.com/page.php?text = {Arabic Word}
现在我正在尝试使用 $_GET['text'] 获取文本,但我一直在获取它,例如“????????” , 有什么问题
<?php
header('Content-type: text/html; charset=UTF-8');
include('EnTransliteration.class.php');
$tr = new EnTransliteration();
$str = iconv( "utf-8//TRANSLIT//IGNORE","windows-1256", $_GET['text']);
$en_str = $tr->ar2en($str);
$string = <<<XML
<root>
<translation>$en_str</translation>
</root>
XML;
$xml = new SimpleXMLElement($string);
header('Content-type: text/xml; charset=UTF-8');
echo $xml->asXML();
?>