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

WBOY
Release: 2016-06-06 20:39:22
Original
903 people have browsed it

如题: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>
Copy after login
Copy after login

回复内容:

如题: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>
Copy after login
Copy after login

dede后台有批量替换的

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

<code>sql</code><code>update tablename set content =replace(content,"httpA","httpB")
</code>
Copy after login
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template