Home >Backend Development >PHP Tutorial >PHP检索某目录下文件名有关问题

PHP检索某目录下文件名有关问题

WBOY
WBOYOriginal
2016-06-13 12:14:12966browse

PHP检索某目录下文件名问题
获取某目录下

xl-1.php, xl-2.php  xl-3.php ....

中 最大的  xl-最大的.php   那个文件名 的 最简易的方法是?
------解决思路----------------------

$a = glob('z/xl-*.php');<br />natcasesort($a);<br />echo end($a);
z/xl-10.php

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn