PHPCMS V9采集地址中有相对路径的问题及解决方法
所属分类:
CMS教程 / phpcms
阅读数:
772
收藏 0赞 0分享
修改数据库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 文章定时发布的方法,定时发布文章可以做到预约发布、自动发布,方便我们在忙的时候更新文章,保证搜索引擎的收录
收藏 0赞 0分享
phpcms v9站内外搜索代码分享
站内外搜索对一个网站有很重要的意义,接下来为大家介绍下phpcms v9实现站内外搜索的代码,感兴趣的朋友可以参考下哈
收藏 0赞 0分享
phpcms 读不到缓存 页面空白的解决方法
网站在服务器上运行正常,弄到我电脑上进入网站后台,更新缓存页面空白,访问首页还是空白。调试发现是在include/common.inc.php中执行到下面不执行了
收藏 0赞 0分享
查看更多