且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

php pathinfo()期望参数1为字符串,数组在

更新时间:2023-02-18 16:50:58

pathinfo返回一个关联数组,它不允许数组作为参数。请参阅文档: http://www.php.net/manual/zh/function .pathinfo.php

pathinfo returns an associative array, it does not allow an array as a parameter. See the docs: http://www.php.net/manual/en/function.pathinfo.php

您的glob将返回包含文件的数组。

Your glob will return an array with files.

路径:要解析的路径。
选项:如果存在,则指定要返回的特定元素;

path: The path to be parsed. options: If present, specifies a specific element to be returned; one of PATHINFO_DIRNAME, PATHINFO_BASENAME, PATHINFO_EXTENSION or PATHINFO_FILENAME.

如果未指定选项,则返回所有可用元素。

If options is not specified, returns all available elements.