开发者

Preg_match PHP Folders

Can someone please show me how i can preg_match this so that it just shows t开发者_Python百科he file name??

Music/dnb/Crazy Talk_Tantrum Desire_192.mp3

show it will just show.

Crazy Talk_Tantrum Desire_192.mp3

Having a right pain trying to get this to work, wasting far too much time on it any help please???


$name = basename('Music/dnb/Crazy Talk_Tantrum Desire_192.mp3');

if you're insisting on using regexps it could be:

preg_match('~/([^/]+)$~', 'Music/dnb/Crazy Talk_Tantrum Desire_192.mp3', $matches);
var_dump($matches[1]);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜