Forums

simplexml_load_file (3 posts)

  1. Albinal
    Member
    Posted 1 year ago #

    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.

  2. 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.

  3. Albinal
    Member
    Posted 1 year ago #

    Thanks Peter. I will look into it.

Topic Closed

This topic has been closed to new replies.

About this Topic