©
Dokumen ini menggunakan Manual laman web PHP Cina Lepaskan
glob:// — 查找匹配的文件路径模式
glob: 数据流包装器自 PHP 5.3.0 起开始有效。
Example #1 基本用法
<?php
// 循环 ext/spl/examples/ 目录里所有 *.php 文件
// 并打印文件名和文件尺寸
$it = new DirectoryIterator ( "glob://ext/spl/examples
var_dump ( fstat ( $stream ));
?>
以上例程的输出类似于:
string(26) "Encrypted file 1 contents." Array ( [0] => 0 [1] => 0 [2] => 33206 [3] => 1 [4] => 0 [5] => 0 [6] => 0 [7] => 26 [8] => 0 [9] => 1259550052 [10] => 0 [11] => -1 [12] => -1 [dev] => 0 [ino] => 0 [mode] => 33206 [nlink] => 1 [uid] => 0 [gid] => 0 [rdev] => 0 [size] => 26 [atime] => 0 [mtime] => 1259550052 [ctime] => 0 [blksize] => -1 [blocks] => -1 )