Answer the question
In order to leave comments, you need to log in
How to check for xml file upload?
I load the xml file of currencies using
$xml = simplexml_load_file('url из интернета');
$usd = (string)$xml->Valute[10]->Value;
$eur = (string)$xml->Valute[11]->Value;
Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/leni_m/www/lk.local/public_html/views/template/header.php on line 2
Warning: simplexml_load_file(url из интернета): failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/leni_m/www/lk.local/public_html/views/template/header.php on line 2
Warning: simplexml_load_file(): I/O warning : failed to load external entity "url из интернета" in /home/leni_m/www/lk.local/public_html/views/template/header.php on line 2
$xml = simplexml_load_file('url из интернета');
Answer the question
In order to leave comments, you need to log in
Try {
// do something
} catch(\Exception $e) {
// catch something
}
Try catch
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question