how to check extension of file php code example Example: php file extension $ext = end(explode(".",file_name));