Home  >  Article  >  Backend Development  >  DeDeCMS怎么替换文章内所有的链接

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

WBOY
WBOYOriginal
2016-06-06 20:39:22903browse

如题: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>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn