手机
当前位置:查字典教程网 >CMS教程 >phpcms >PHPCMS V9采集地址中有相对路径的问题及解决方法
PHPCMS V9采集地址中有相对路径的问题及解决方法
摘要:修改数据库v9_collection_node,增加两个字段replace_from,replace_to(varchar(200))1、/...

修改数据库v9_collection_node,增加两个字段replace_from,replace_to(varchar(200))

1、 /phpcms/modules/collection/templates/node_form.tpl.php第99行后增加(位置在</table></fieldset>之前)

<tr>

<td width="120">网址替换:</td>

<td>

<input type="text" name="data[replace_from]" style="width:250px" value="<?php if(isset($data['replace_from'])) echo $data['replace_from']?>"/>替换为

<input type="text" name="data[replace_to]" style="width:250px" value="<?php if(isset($data['replace_to'])) echo $data['replace_to']?>"/>

</td>

</tr>

2、 /phpcms/modules/collection/classes/collection.class.php第177行后增加(位置在:$html = str_replace(array("</a>", "</A>"), "</a> ", $html);之后)

if(!empty($config['replace_from'])){

$html = str_replace($config['replace_from'], $config['replace_to'], $html);}

3、 进入数据库给 数据库名_collection_node 增加字段:replace_from 和 replace_to 两个字段。字数50-100都可以。

然后在采集管理中我们能看到有替换网址的选项啦。将多余的../之类的替换掉就行了。

【PHPCMS V9采集地址中有相对路径的问题及解决方法】相关文章:

PHPCMS v9过滤采集内容中CSS样式的实现方法

PHPCMS2008 SP4 心情排行指数不显示的解决办法

PHPCMS忘记后台密码找回及时间解锁方法

phpcms搜索不能重新生成缓存的解决方法

phpcms后台设置了访问域名后导致网站后台无法访问的解决方法

phpsso忘记密码的解决办法

PHPCMS V9采集过滤选项遗留下换行 回车 空格的解决办法

PHPCMS内容页文章标题添加页码的方法教程

为PHPCMS 2008 编辑器增加常用中文字体方法

phpcms v9出现Can not connect to MySQL server错误的原因和解决方法

精品推荐
分类导航