Skip to content

Instantly share code, notes, and snippets.

@Majkl578
Created September 21, 2010 22:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Majkl578/3c1d057986ae46b47735 to your computer and use it in GitHub Desktop.
Save Majkl578/3c1d057986ae46b47735 to your computer and use it in GitHub Desktop.
<?php
clearstatcache();
$s = microtime(TRUE);
$dir = opendir('/tmp/test/');
$soubory = array();
while (($soubor = readdir($dir)) !== FALSE) {
if ($soubor !== '.' && $soubor !== '..' && $soubor !== '.htaccess' && $soubor !== '.ftpaccess') {
$soubory[] = array(
'name' => $soubor,
// 'date' => filemtime($path_files . $soubor),
// 'size' => filesize($path_files . $soubor)
);
}
}
closedir($dir);
if (!empty($soubory)) {
foreach ($soubory as $hodnota) {
if (strpos($hodnota['name'], 'x') !== false) {
echo $hodnota['name'], '<br>';
}
}
} else {
echo 'Nic nenalezeno';
}
var_dump(microtime(TRUE) - $s);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment