Home >php教程 >php手册 >PHP如何用正则取得所有图片的路径

PHP如何用正则取得所有图片的路径

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 11:38:22853browse

问题:

 如下面内容,两个问题:
1、用正则取得所有图片地址的php语句怎么写?
2、取出的多个地址如何一条一条地保存到数据库中?

1、什么是在线编辑器 2、fckeditor配置 3、fckeditor的应用 4、fckeditor结合数据库应用

回答:

$str ='

1、什么是在线编辑器 2、fckeditor配置 3、fckeditor的应用 4、fckeditor结合数据库应用

';
preg_match_all("/\PHP如何用正则取得所有图片的路径]*>/i", $str, $match);
print_r($match);
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