$img="http://www.1wjt.com/includes/kindeditor/php/../../../images/upload/image/20171219/20171219212859_24427.jpg";
preg_match('/\/(?P<name>\w+\.(?:png|jpg|gif|bmp))$/i', $img,$matches);
$img="http://www.1wjt.com/includes/kindeditor/php/../../../images/upload/image/20171219/20171219212859_24427.jpg";
preg_match('/\/(?P<name>\w+\.(?:png|jpg|gif|bmp))$/i', $img,$matches);