<?php
header('Content-type:text/html;charset=utf8');

$str = '2390230.png';
$str_arr = explode('.',$str);
$str_arr_count = count($str_arr);
$str_last = ".".$str_arr[$str_arr_count - 1];

echo basename($str,$str_last);      //注意:basename   会自动过滤中文

05-26 09:31