我有这样一条路:
parent/child/reply
我如何使用PHP删除路径的最后一部分,使其看起来像这样:
parent/child
dirname($path)
这是文档。
dirname().您可以根据需要多次使用它
dirname()