加了頭部header("content-type:text/xml") 就會(huì)報(bào)錯(cuò)
加了頭部header("content-type:text/xml"); 就會(huì)報(bào)錯(cuò)
This page contains the following errors:
error on line 3 at column 6: XML declaration allowed only at the start of the document
Below is a rendering of the page up to the first error.
不知道什么原因,跟我用TP框架有關(guān)系嗎
2017-07-18
header('Content-Type:text/xml');中的:是英文下的:,不是中文下的:否則PHP會(huì)當(dāng)做沒(méi)有使用header('Content-Type:text/xml');仍然按照html解析下面的xml文檔了
2017-02-16
我也遇到了這個(gè)問(wèn)題。。。
2016-10-09
+1 我也是這個(gè)問(wèn)題??? 不能改成xml
2016-03-18
對(duì) 我們遇到的問(wèn)題一樣 ?可是老師的代碼怎么可以運(yùn)行呢?
2016-03-10
這個(gè)header不管放什么位置都不行,前面也沒(méi)有其他輸出