欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

PHPCMS V9采集地址中有相對路徑的問題及解決方法

  發(fā)布時間:2012-05-21 10:35:26   作者:佚名   我要評論
PHPCMS V9采集文章時.有的時候會出現(xiàn)在地址中有相對路徑的問題,如何解決呢.下面看一下解決方法
修改數(shù)據(jù)庫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">網(wǎng)址替換:</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、 進(jìn)入數(shù)據(jù)庫給 數(shù)據(jù)庫名_collection_node 增加字段:replace_from 和 replace_to 兩個字段。字?jǐn)?shù)50-100都可以。
然后在采集管理中我們能看到有替換網(wǎng)址的選項啦。將多余的../之類的替換掉就行了。

相關(guān)文章

最新評論