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.";
}
这不起作用....我如何使错误检测工作?