duanshan1511 2014-06-26 18:42
浏览 82
已采纳

使用str_replace替换img src无效

Hi I'm trying to modify the src of a image that I uploaded by ckfinder and I want a full path I see other answers here but I dont know why my code doesn't work ,look at it please

$html = '<p> <img alt="" src="/deconsultas/javascript/ckfinder/files/images/xxx.jpg"/></p>';
$dato = str_replace("src=&quot/deconsultas/javascript","a",$html);
echo $dato;

Where is the error please ?

  • 写回答

3条回答 默认 最新

    报告相同问题?

    相关推荐 更多相似问题

    悬赏问题

    • ¥15 gradle项目报错
    • ¥60 有关C#的问题,基础牢固的来
    • ¥15 Python算法设计Seam carving--让图片比例随心缩放
    • ¥15 页面制作,HTML CSS
    • ¥15 通个批处理实现 win7和win10 修改或设置:显示操作系统列表时间为2秒
    • ¥20 报错:Unsupported class file major version 59
    • ¥15 用ASP代码实现跨站脚本攻击
    • ¥50 ABP中怎样接收vue上传的图片
    • ¥15 uniapp设置音频的倍速播放无效
    • ¥15 关于#hc#的问题,如何解决?