我试图使用DOMDocument写入包含&符号的链接的XML文件.当我尝试这个时,链接变为&在xml中.从而product=1&qty;=1成为product=1&qty;=1.
product=1&qty;=1
product=1&qty;=1
你能告诉我一种避免这种情况的方法吗?
php xml
php ×1
xml ×1