当前位置:首页 > 开发教程 > dede教程 >

dedecms教程:绑定二级域名导致图片路径不对的解决方法

时间:2016-01-18 15:49 来源:互联网 作者:源码搜藏 收藏

打开 include/extend.func.php 文件 在此文件中增加如下函数: function replaceurl($newurl) { $newurl=str_replace(src=/uploads/allimg/,http://你的域名/uploads/allimg/,$newurl); return $newurl; } 调用文章正文内容的标签 {dede:field.body/} 需要改 打开 include/extend.func.php 文件
在此文件中增加如下函数:
function replaceurl($newurl)
{
$newurl=str_replace(‘src="http://p1.codesocang.com/uploads/allimg/’,’http://你的域名http://p1.codesocang.com/uploads/allimg/’,$newurl);
return $newurl;
}


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

dede教程阅读排行

最新文章