“String could not be parsed as XML” php error

前端 未结 1 1830
陌清茗
陌清茗 2021-01-25 10:57

I keep getting this error when I try to create a new instance of SimpleXMLElement.

I checked my xml syntax manually and with online tools, and even copy/pas

相关标签:
1条回答
  • 2021-01-25 11:20

    I replicated this message by making sure that example.php cannot be found. I think this is your problem too.

    Check that example.php is in a directory from which includes are served or else, put it in the same directory.

    If this is indeed the case, you need to turn up your error reporting levels, I saw a notice and 2 warnings prior to the exception - these spell out exactly what was causing this problem, and will save you a lot of time, effort and hair.

    Setting error reporting

    0 讨论(0)
提交回复
热议问题