2017-08-25 66 views
0

在我的項目腳本中,它始終運行平穩,但只有當描述如此時它纔會顯示「無法解析錯誤」。或者如果特殊字符的數量多於這樣的錯誤也會出現。我已經照顧基本的特殊字符。如果你能告訴我這個描述有什麼問題,那將是非常好的,因爲它總是給出這個錯誤。描述較大時無法解析xml數據

$description = "hi every one 
now i will tell you what i want exactly 
i want Development script for upload and sharing files like mediafire and mega 
i will tell you about every details what i need 
the websit or script will be dedicated to upload files, Whether been videos or photos or psd or pdf or mp3 every thing, i want members system in  the script, will be there normal members and premium members, premium members will be have more features more than normal member, you can see difference between them in this picture 
there are other things i want it in script 
like Control Panel for members and Control Panel for admin 
contact us page, terms page & other pages like that 
linking the website in my account on Paypal to receive the money on him 
this is the important things so i want tell me how much exactly will cost script like this" 


<Leads> 
<row no="1"> 
<FL val="Name">'XYZ'</FL> 
<FL val="Email">'[email protected]'</FL> 
<FL val="Country">'NEW JERSEY'</FL> 
<FL val="Description">'.$description.'</FL> 
</row> 
</Leads> 

回答

1

在腳本中使用CDATA。

<FL val="Description"><![CDATA['.$description.']]]]></FL> 
+0

我已經在使用它 –

+0

但它不工作在可變 –

+0

使用** $ **描述的功能 **用htmlspecialchars($描述,ENT_QUOTES); ** –