php - xml data cannot be var_dumped?
代言
代言 2017-06-20 10:07:51
0
3
1016

I looked at the WeChat payment document demo and converted the array into xml data
But when I print var_dump() or echo it all turns into numbers.
Does anyone know how to deal with it?
Data before conversion

After conversion, it becomes a number....

代言
代言

reply all(3)
仅有的幸福

Right click->View source code, the browser parses the xml tag as an html tag

Or specify the document type as XML

header("Content-Type:text/xml; charset=UTF-8");
某草草

You need to add a header tag when printing xml,

header("Content-Type:text/xml;charset=utf-8");
三叔

This is an object. Do you want to insert the parameters of the object into xml? ? ?
But I see that your code directly traverses the object and assigns it directly into xml...
Should you convert the object into data first

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!