dongshan2004 2013-09-04 18:06
浏览 34
已采纳

需要从php中的图像src中删除\“

I need to replace \" from image src.

I have one form and i use the FCK editor for Details and when i upload image and submit a form then after i get below value in post

<img scr="\"http://test.in/public/admin/uploadfiles/Lighthouse(2).jpg\"">

So i need to remove \" from starting and \" from end so its display properly to me. I also try ltrim() and strreplace() but when i put some other things then it replace each place so i need to replace it only in img scr must start and end \" only

Any why to do this. I think this is possible using Regular expression but i have not enough knowledge for it.

Please suggest me any idea.

  • 写回答

4条回答 默认 最新

  • dsrruefh12970 2013-09-04 18:10
    关注

    Disable magic_quotes in your php config, then edit all your text where this error occurs to correct.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 微带串馈天线阵列每个阵元宽度计算
  • ¥15 关于无人驾驶的航向角
  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥30 BC260Y用MQTT向阿里云发布主题消息一直错误
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了