0
我希望能夠檢測誤差的SimpleXMLElement,錯誤是:使用SimpleXMLElement檢測錯誤?
failed to open HTTP stream
failed to load external entity
Uncaught exception 'Exception' with message 'String could not be parsed as XML'
我有以下代碼嘗試檢測錯誤。
$xml = new SimpleXMLElement("https://mail.google.com/mail/feed/atom",null,true);
if ($xml === FALSE) {
echo "Wrong username/password combination.";
}
這不起作用....我如何使錯誤檢測工作?