File Directory Php

//
// Usage:
// $filename = "script.php";
// $extention = GetFileExtention($filename);
// echo $extention;
//
function GetFileExtention($filename) {
$ext = strch($filename,".");
return $ext;
}
?>