0
我从服务器加载文件:PHP:使用simplexml_load_file检查服务器状态
$url = 'http://www.sample.com/test.xml';
$xml = simplexml_load_file($url);
如果服务器是接近我得到错误:
Warning: simplexml_load_file() [function.simplexml-load-file]: php_network_getaddresses: getaddrinfo failed:...
Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity
如何检查是否到达文件?