首页 > Web开发 > 详细

phpcms采集地址中为相对路径解决方法

时间:2014-10-11 18:17:27      阅读:361      评论:0      收藏:0      [点我收藏+]

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

2./phpcms/modules/collection/templates/node_form.tpl.php第99行后增加

<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>

3./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);

 

phpcms采集地址中为相对路径解决方法

原文:http://www.cnblogs.com/savokiss/p/4019285.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!