The function is used to test that the specified string looks like just as the basename of a path, without any absolute or relative path.
Attach a file by drag & drop or click to upload