演示链接:查看演示

dedecmsdedecms绑定二级域名导致图片路径不对的解决方法

打开 include/extend.func.php 文件

在此文件中增加如下函数:

function replaceurl($newurl)

{

$newurl=str_replace(‘src="/uploads/allimg/’,’http://你的域名/uploads/allimg/’,$newurl);

return $newurl;

}




调用文章正文内容的标签 {dede:field.body/} 需要改为 {dede:field.body function=’replaceurl(@me)’/}

THE END
喜欢就支持一下吧
点赞0 分享