Home > Backend Development > PHP Tutorial > PHP怎么只读取一篇文章的文字,不读取图片呢?

PHP怎么只读取一篇文章的文字,不读取图片呢?

WBOY
Release: 2016-06-13 12:54:00
Original
901 people have browsed it

PHP如何只读取一篇文章的文字,不读取图片呢?急~
大家好,我在做一个网站,有一篇文章,我要在首页显示这篇文章的文字,但这篇文章中间又有图片,我只要读取前面的240个文字做引导语言,读取240个文字我会,但不知道如何过滤掉图片。
请大家帮帮忙。。。

php 语言
------解决方案--------------------
正则  总之过滤掉图片的html代码即可.
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