BRAVO
BRAVO

Reputation: 233

how to get filename in php

$str = "/d/file/shop/7c0ea5b0b96a490a9c78255ddb559943.jpg";

How do I get the filename 7c0ea5b0b96a490a9c78255ddb559943.jpg from the full path?

Thanks a lot.

Upvotes: 3

Views: 302

Answers (1)

Borealid
Borealid

Reputation: 98469

basename($str);

Upvotes: 10

Related Questions