Detect file extension function

This function is used to find the file extension also you can use pathinfo() function for get information about a file path.

function ext($file_name)
{
   return substr($file_name, strrpos($file_name, '.') + 1);
}

Tags

No tag here.

Recommended pages

SQL escape string function...

Escapes special characters in a string for use in an SQL statement. howewer it check get_magic_quotes_gpc function is enable or no. if true , it strips string from slashes and escaped string from spec...

PHP subwords() Function...

Function subwords, gets words by max num....

How to created mixed arguments function...

This way useful for create mixed arguments function. function foo() { $args = func_get_args(); print_r($args); }   foo(1, 1256, 6, 17); //mixed ...   -------------------Out-...

File size calculator...

File size calculator function return file size format into kb, mb or gb. function file_size($size, $out = 'kb', $precision = 2) { switch ($out) { case 'kb': return round($...