Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设我有一个文件路径-
Doc/Monday/File.txt
我想使用 substr() 来选择File.txtPHP。我怎么做?
File.txt
basename('/some/path/to/file.txt');
用“/”分解字符串,取出结果数组的最后一个元素
TRy this
$data= pathinfo('/some/path/to/file.txt'); echo $data['basename'];
从早上开始,我就陷入了以下问题。在一个地方同样的事情正在工作,第二个地方它不工作是不显示错误。我检查了这个问题被问了很多次,我参考了所有的问题和解决方案,但问题仍然是一样的。按照我在控制器中使用的代码。
@RequestMapping(method = RequestMethod.POST) public String findRide(@Mo