Tuesday, April 6, 2010

Get file extension

function file_get_ext(filename)
{
return typeof filename != "undefined" ? filename.substring(filename.lastIndexOf(".")+1, filename.length).toLowerCase() : false;
}

No comments:

Post a Comment