php output xml produces parse error “’”

前端 未结 7 1491
时光说笑
时光说笑 2021-01-13 08:24

Is there any function that I can use to parse any string to ensure it won\'t cause xml parsing problems? I have a php script outputting a xml file with content obtained from

7条回答
  •  攒了一身酷
    2021-01-13 09:14

    Use htmlspecialchars() will solve your problem. See the post below.

    PHP - Is htmlentities() sufficient for creating xml-safe values?

提交回复
热议问题