php 截取url的图片名
$url = "http://www.abc.com/images/xxxx.jpg"; $parts = parse_url($url); dump($parts['path']); $c=$parts['path']; $a=explode('/',$c); dump($a); dump($a[2]); $b=explode('.',$a[2]); dump($b); echo $b[0];
https://zhidao.baidu.com/question/758862156686219324.html