<table width="100%" cellspacing="1" cellpadding="0" border="1">
<tbody>
<tr>
<td height="30" bgcolor="#006699" align="center" class="heading" colspan="6" style="color:#fff; font-size:22px;">hello this is test</td>
</tr>
<table width="\\100%\\" cellspacing=\\"1\\" cellpadding=\\"0\\" border=\\"1\\">
<tbody>
<tr>
<td height=\\"30\\" bgcolor=\\"#006699\\" align=\\"center\\" style=\\"color:#fff; font-size:22px;\\" colspan=\\"3\\" class=\\"heading\\">hello this is test </td>
</tr></tbody></table>
我是否可以从中删除反斜杠?
最佳答案
您的服务器已启用Magic Quotes。您可以联系您的主机并要求他们禁用它,或者在将数据发送到查询之前,您可以对其使用 stripslashes()
。请参阅 this answer 了解更多信息。
关于php - 转义插入 MySQL 的原始 HTML 数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21431766/