filename) and get the file name you could use Definition and Usage - basename() The basename() function returns the filename from a path. Syntax. Basename(path,suffix). Parameter. Description.