欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

php读取.svg图片的SVG里d="XXXXX",就是XXXXX

程序员文章站 2022-06-09 22:01:52
...


回复内容:


$content = include "xxx.svg";
preg_match("/

以下是具体的:

$content = '';
preg_match("/

输出结果:
string 'M32,0C14.327,0,0,14.327,0,32s14.327,32,32,32s32-14.327,32-32S49.673,0,32,0z M32,58C17.641,58,6,46.359,6,32

        C6,17.64,17.641,6,32,6c14.359,0,26,11.64,26,26C58,46.359,46.359,58,32,58z' (length=193)
相关标签: svg php