|
2行代码轻松解决:
- $goods['goods_desc'] = preg_replace('/\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i', '', $goods['goods_desc']);//去除图片的链接
- $goods['goods_desc']= str_ireplace('src="/images/' ,'src="http://www.cybn.cn/images/',$goods['goods_desc']);//把图片设定为绝对地址
复制代码
当然还有种 办法,去除所有商品链接。不过杀伤力太强了~~
- $goods['goods_desc'] = ereg_replace("<a [^>]*>|<\/a>","",$row['goods_desc']); // 去掉商品描述所有链接
复制代码
以上可在includes/lib_goods.php 约744行操作。
|
|