Glob
La envoltura de secuencias glob: está disponible desde PHP 5.3.0.
Example #1 Uso básico
<?php
// Visitar todos los archivos *.php en el directorio ext/spl/examples/
// e imprimir el nombre del archivo y su tamaño
$it = new DirectoryIterator("glob://ext/spl/examples/*.php");
foreach($it as $f) {
printf("%s: %.1FK\n", $f->getFilename(), $f->getSize()/1024);
}
?>
tree.php: 1.0K findregex.php: 0.6K findfile.php: 0.7K dba_dump.php: 0.9K nocvsdir.php: 1.1K phar_from_dir.php: 1.0K ini_groups.php: 0.9K directorytree.php: 0.9K dba_array.php: 1.1K class_tree.php: 1.8K
| Atributo | Soporte |
|---|---|
| Restringido por allow_url_fopen | No |
| Restringido por allow_url_include | No |
| Permite Lectura | No |
| Permite Escritura | No |
| Permite Adición | No |
| Permite Lectura y Escritura Simultánea | No |
| Soporta stat() | No |
| Soporta unlink() | No |
| Soporta rename() | No |
| Soporta mkdir() | No |
| Soporta rmdir() | No |
Glob
There are no user contributed notes for this page.
