dedecms织梦模板 绑定二级域名导致图片路径不对的解决方法
发布时间:09/02 来源:未知 浏览:
关键词:
打开 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)’/}
在此文件中增加如下函数:
function replaceurl($newurl)
{
$newurl=str_replace(‘src="/uploads/allimg/’,’http://你的域名/uploads/allimg/’,$newurl);
return $newurl;
}
调用文章正文内容的标签 {dede:field.body/} 需要改为 {dede:field.body function=’replaceurl(@me)’/}