PHP SimpleXML 和转义字符串
我有一个脚本从数据库中提取一些数据,然后使用 SimpleXML 以 xml 格式发送它。使用该服务的客户端使用 file_get_contents(url-to-script) 加载 xml,然后使用 SimpleXML 查找相关数据并将其显示在网页上。
我遇到的问题是网页上的输出总是被转义。无论我运行多少次通过斜杠返回的字符串,它仍然会被转义。
有什么想法如何去掉斜线吗?
编辑:
数据通过第三方应用程序放入数据库,我们从不以编程方式输入。然而,我们在许多其他应用程序中从中提取它并且它没有被转义。
我们不会在任何地方的数据上使用addslashes。
magic_quotes_gpc 已打开,所有其他 magic_quotes 选项均已关闭
I have a script pulls some data out of a database and then sends it in xml format using SimpleXML. Clients that use the service load the xml using file_get_contents(url-to-script) and then use SimpleXML to find the relevant data and display it on a webpage.
The problem I am having is that the output on the webpage is always escaped. It doesn't matter how many times I run the strings I am getting back through stripslashes, it is still escaped.
Any ideas how to strip the slashes?
EDIT:
The data is put into the database through a 3rd party application, we never enter it programmatically. However, we extract from it in a number of other applications and it is not escaped.
We are not using addslashes on the data anywhere.
magic_quotes_gpc is on, all the other magic_quotes options are off
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请尝试回答以下问题并更新您的问题,这将有助于找出您的问题所在
这是必要的信息,可以帮助您避免盲目猜测。
Please try and answer the below questions and update your question, it will help figure out where your problem is
This is necessary information to help you without blindly guessing.