删除除文件名php之外的所有内容

3 php

我想在文件名ex之前摆脱一切:

/home/mike/whatever/test_1.txt
Run Code Online (Sandbox Code Playgroud)

只离开 test_1.txt

最简单的方法是什么?

谢谢