View Single Post
  #1   IP: 153.99.39.110
Old 2016-08-16, 12:43 AM
Kamila Kamila is offline
初级会员
 
Join Date: 2013-01-19
Posts: 1
Kamila 现在声名狼藉
Default Best way to get files from a dir filtered by certain extension in php

So right now I have a directory and I am getting a list of files
Code:
$dir_f = "whatever/random/";
$files = scandir($dir_f);
That, however, retrieves every file in a directory. How would I retrive only files with a certain extension such as .ini in most efficient way.
Reply With Quote