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

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

WBOY
Release: 2016-06-13 12:14:12
Original
967 people have browsed it

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

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

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

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template