Home  >  Article  >  Backend Development  >  How to get the suffix of uploaded file in php?

How to get the suffix of uploaded file in php?

WBOY
WBOYOriginal
2016-07-28 08:28:112031browse

<code><span>$temp_arr</span> = explode(<span>"."</span>, <span>$file_name</span>);
 <span>$file_ext</span> = array_pop(<span>$temp_arr</span>);
 <span>$file_ext</span> = <span>trim</span>(<span>$file_ext</span>);
 <span>$file_ext</span> = strtolower(<span>$file_ext</span>);</code>
').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces how to get the suffix of uploaded files in php? , including relevant content, I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn