search

Home  >  Q&A  >  body text

php - How to get the file name of the accessed image in laravel?

Accessing the image address

www.aaa.com/public/img/123.jpg

How to get 123.jpg when accessing the image address

漂亮男人漂亮男人2843 days ago592

reply all(1)I'll reply

  • 迷茫

    迷茫2017-06-12 09:23:13

    Use pathinfo(), for example:

    pathinfo('www.aaa.com/public/img/123.jpg',PATHINFO_BASENAME)

    PHP documentation: http://php.net/manual/en/func...

    reply
    0
  • Cancelreply