1. <?
    2. $name = "/var/www/upload/a.rar"
    3. $ext = strtolower( end( explode('.', $name) ) );
    4. //就是按照 . 分割成数组,并取出数组最后一个元素。