Title: simplexml_load_file
Last modified: August 19, 2016

---

# simplexml_load_file

 *  [Albinal](https://wordpress.org/support/users/albinal/)
 * (@albinal)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/simplexml_load_file/)
 * I’m trying to load some data into one of my templates using simplexml_load_file.
   This works fine if the xml file is on some other webspace but as soon as I host
   it on the space where my wordpress files are it doesn’t show. I don’t get an 
   error message but nothing happens.
 * To ensure I’ve got the right path I’ve used the full absolute url to where it
   is, which works in a browser, but not through the template page. If I switch 
   to the same xml file on another site it works?!?
 * Any ideas on how to fix this would be very much appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Peter Westwood](https://wordpress.org/support/users/westi/)
 * (@westi)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/simplexml_load_file/#post-1606277)
 * It sounds like your server can’t connect to itself correctly over HTTP.
 * This happens on some hosts where the webserver doesn’t accept connections from
   itself.
 * Why not switch to using a file path rather than a url for the xml file seeing
   as it is on the same server.
 *  Thread Starter [Albinal](https://wordpress.org/support/users/albinal/)
 * (@albinal)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/simplexml_load_file/#post-1606297)
 * Thanks Peter. I will look into it.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘simplexml_load_file’ is closed to new replies.

## Tags

 * [path](https://wordpress.org/support/topic-tag/path/)
 * [simplexml_load_file](https://wordpress.org/support/topic-tag/simplexml_load_file/)
 * [xml](https://wordpress.org/support/topic-tag/xml/)

 * 2 replies
 * 2 participants
 * Last reply from: [Albinal](https://wordpress.org/support/users/albinal/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/simplexml_load_file/#post-1606297)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
