Not signed in (Sign In)

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorddejong
    • CommentTimeJul 4th 2006
     
    $filename_parts = explode(".", $filename);
    $filename_ext = strtolower(array_pop($filename_parts));


    Try this. Won't break on an extension that's not 3 characters (e.g. jpeg), but otherwise does the same thing.

    If $filename_parts[0] gets used later, I would then also add this:
    $filename_parts = array(implode($filename_parts));

    Cheers,
    Derek