使用PHP获取URL的最后一部分

迈克尔·麦克古克

在PHP中,我有以下字符串:

$row_data[0] = "\Documents\Images\File";

如何File使用PHP从此字符串中提取单词

我已经尝试过了,但是没有成功。

$end = substr(strrchr($row_data[0], '\'), 1);

曼尼什

添加 \

$row_data[0] = "\Documents\Images\File";
echo $end = substr(strrchr($row_data[0], '\\'), 1);

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章