Home  >  Article  >  CMS Tutorial  >  How does dedecms call the annotations of pictures in the picture collection?

How does dedecms call the annotations of pictures in the picture collection?

藏色散人
藏色散人Original
2019-12-19 10:22:202028browse

How does dedecms call the annotations of pictures in the picture collection?

dedecmsHow to call the annotation of the picture in the picture collection?

This article introduces the method of dedecms calling the picture annotation in the picture collection. The code is simple, just look at the code below

Recommended learning: 梦Weavercms

The code is as follows:

{dede:field name='imgurls' runphp='yes'}
$text="@me";
preg_match("'alt=(.+)border'",$text,$array);
@me=preg_replace("/\'/",'', $array[1]); 
{/dede:field}

Note: If it cannot be adjusted, put this code in front of the picture and try again.

The above is the detailed content of How does dedecms call the annotations of pictures in the picture collection?. For more information, please follow other related articles on the PHP Chinese website!

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