|
|
Find the extension of filename in php - PHP
|
Views : 255
|
|
Tagged in : PHP
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
we can use the function pathinfo to find or get the extension of the filename.
// First use the function pathinfo. send the filename as argument to pathinfo.
$info = pathinfo($file);
// the resulting array has the extension. we can fetch it as shown below.
$file_name = $info['extension'];
|
|
By rajesh, On - 2010-01-03 |
|
|
|