国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > CMS > PhpCMS > 正文

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

2024-09-10 07:16:40
字體:
來源:轉載
供稿:網友
修改數據庫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都可以。
然后在采集管理中我們能看到有替換網址的選項啦。將多余的../之類的替換掉就行了。
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 荆门市| 洱源县| 师宗县| 铜陵市| 阳春市| 平度市| 枞阳县| 八宿县| 株洲县| 洪湖市| 石楼县| 平定县| 新郑市| 望奎县| 衡山县| 唐河县| 安义县| 新绛县| 靖边县| 中江县| 进贤县| 九寨沟县| 汶上县| 长阳| 金华市| 金堂县| 平果县| 察隅县| 应用必备| 衢州市| 安泽县| 房山区| 荔波县| 望谟县| 龙海市| 同江市| 崇仁县| 邳州市| 闽侯县| 乌兰县| 丰镇市|