D
D
Denis Prikhodko2015-02-07 03:38:37
PHP
Denis Prikhodko, 2015-02-07 03:38:37

Which script to choose to filter files in a folder?

Good afternoon. Prompt a script for filtering by the name of files in a folder.
There are a huge number of files in the folder. File name mask XX/XXXX/XXXX/XXX. How can I organize a search or filter on these files based on the names.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim, 2015-02-07
@maxloyko

or so xD

$directory = '.';
$search_file = 'some_lf_filename'; 
/**
 * return @bool
 */
$scanned_directory = in_array($search_file,array_diff(scandir($directory), array('..', '.')));

A
Anton Shamanov, 2015-02-07
@SilenceOfWinter

php.net/manual/en/function.glob.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question