bug24482.phpt
来自「php-4.4.7学习linux时下载的源代码」· PHPT 代码 · 共 38 行
PHPT
38 行
--TEST--Bug #24482: GLOB_ONLYDIR not working--SKIPIF--<?phpif (!function_exists("glob")) { die('skip glob() not available');}?>--FILE--<?php$globdirs = glob("*", GLOB_ONLYDIR);$dirs = array();$dh = opendir(".");while (is_string($file = readdir($dh))) { if ($file{0} === ".") continue; if (!is_dir($file)) continue; $dirs[] = $file;}closedir($dh);if (count($dirs) != count($globdirs)) { echo "Directory count mismatch\n"; echo "glob found:\n"; sort($globdirs); var_dump($globdirs); echo "opendir/readdir/isdir found:\n"; sort($dirs); var_dump($dirs);} else { echo "OK\n";}?>--EXPECT--OK
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?