How To Get File Extension Or File Type Using Php Script Code
- Forums
- PHP
- How To Get File Extension Or File Type Using Php Script Code
show me how to get file extension using php code from a string [1303], Last Updated: Sat May 18, 2024
fabrain
Fri Oct 21, 2011
1 Comments
596 Visits
please show me how to get file extension using php code from a string
for example if i have a string called:
$Foo = 'MyPictures.gif';
how can i extract the 'gif' part?
$File_Extention = substr($Foo, strrpos($Foo, '.') + 1);
echo $File_Extention
OUTPUT:
gif
https://www.wallpaperama.com/forums/_awxepr.html