It seems that PHP does not come with the function to get the suffix name of the file, the book has not been found, the web search has not, wrote a function, it is easy to get. See online A lot of friends are looking, send to share, if you find a better way, be sure to leave a message to tell me!
The functions are as follows:
function Gontenfile ($FILESTR) {
$gonten = Explode ('. ', $filestr); Separating file names into arrays with dot numbers
$gonten = Array_reverse ($gonten); Reverse the above array
return $gonten [0]; Returns the first value of a reversed array
}
with $filename = gontenfile (' filename '); This way, you can get the suffix of the file.
This article from: www.Gonten.com
http://www.bkjia.com/PHPjc/364406.html www.bkjia.com true http://www.bkjia.com/PHPjc/364406.html techarticle It seems that PHP does not come with the function to get the suffix name of the file, the book has not been found, the web search has not, wrote a function, it is easy to get. See many friends on the internet looking for ...