$full_path ='A:\dir\file.jpg'; $filename = basename($full_path); # file.jpg