Answer the question
In order to leave comments, you need to log in
How to display an image with a specific name but an unknown extension (jpg/png)?
Tell me how to display an image with a specific name, but an unknown extension (jpg/png)? At the moment I only output jpg like this:
echo '<img src="users/'.$user->folder.'/cover_user.jpg">';
Answer the question
In order to leave comments, you need to log in
Well, actually, cover_user.jpg
that's the name. A users/dirname/cover_user.jpg
is the relative path to the file. As the fanatic said, store the image in a single type or without .расширение
it, just give the corresponding mime in the title.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question