首頁  >  文章  >  後端開發  >  DeDeCMS怎么替换文章内所有的链接

DeDeCMS怎么替换文章内所有的链接

WBOY
WBOY原創
2016-06-06 20:39:22874瀏覽

如题:DeDeCMS怎么替换文章内所有的链接
例如:

<code><a href="http://www.1.com/werw.html">abc1</a>
<a href="http://www.2.com/dir/werw.html">abc2</a>
<a href="http://www.1.com/2324.html">abc3</a>

可以写成PHP文件或mysql语句
</code>

回复内容:

如题:DeDeCMS怎么替换文章内所有的链接
例如:

<code><a href="http://www.1.com/werw.html">abc1</a>
<a href="http://www.2.com/dir/werw.html">abc2</a>
<a href="http://www.1.com/2324.html">abc3</a>

可以写成PHP文件或mysql语句
</code>

dede后台有批量替换的

找到存放文章的数据表,例如叫tablename ,保存文章内容的字段叫 content
执行下列语句

<code>sql</code><code>update tablename set content =replace(content,"httpA","httpB")
</code>
陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn