XML parser error: entity not defined

前端 未结 6 1849
醉话见心
醉话见心 2020-12-03 02:34

I have searched stackoverflow on this problem and did find a few topics, but I feel like there isn\'t really a solid answer for me on this.

I have a form that users

6条回答
  •  感情败类
    2020-12-03 03:09

    Use "htmlentities()" with flag "ENT_XML1": htmlentities($value, ENT_XML1);

    If you use "SimpleXMLElement" class:

    $SimpleXMLElement->addChild($name, htmlentities($value, ENT_XML1));

提交回复
热议问题