glob(PHP 4 >= 4.3.0, PHP 5, PHP 7) Show glob — Find pathnames matching a pattern Descriptionglob ( string Parameterspattern The pattern. No tilde expansion or parameter substitution is done. Special characters:
flags Valid flags:
Return Values Returns an array containing the matched files/directories, an empty array if no file matched or
Changelog
ExamplesExample #1 Convenient way how glob() can replace opendir() and friends.
The above example will output something similar to: funclist.txt size 44686 funcsummary.txt size 267625 quickref.txt size 137820 Notes
See Also
(PHP 4 >= 4.3.0, PHP 5, PHP 7) glob — Find pathnames matching a pattern Descriptionarray glob ( string Parameterspattern The pattern. No tilde expansion or parameter substitution is done. flags Valid flags:
Return Values Returns an array containing the matched files/directories, an empty array if no file matched or
Changelog
ExamplesExample #1 Convenient way how glob() can replace opendir() and friends.
The above example will output something similar to: funclist.txt size 44686 funcsummary.txt size 267625 quickref.txt size 137820 Notes
See Also
User Contributed Notescrayonviolent at phpfreaks dot com 7 years ago
redcube at gmx dot de 9 years ago
uramihsayibok, gmail, com 6 years ago
= new RecursiveDirectoryIterator("/path"); dragos dot rusu at ymail dot com 6 years ago
carlos dot lage at nospam at foo dot bar at gmail dot com 7 years ago
Mike 4 years ago
glob(dirname($pattern).'/*', GLOB_ONLYDIR|GLOB_NOSORT) as $dir) ni dot pineau at gmail dot com 3 years ago
= glob('/path/*{foo,bar}.dat',GLOB_BRACE); Gabriel S. Luraschi 3 years ago
alan at synergymx dot com 8 years ago
NOSPAM sketch at infinite dot net dot au 11 years ago
david dot schueler at tel-billig dot de 5 years ago
peter dot adrianov at gmail dot com 5 years ago
$i = 0; $i < count($items); $i++) { Ultimater at gmail dot com 5 years ago
agd243 at gmail dot com 3 years ago
mif 2 years ago
Sam Bryan 4 years ago
soywiz at gmail dot com 3 years ago
bisqwit at iki dot fi 8 years ago
Anonymous 11 years ago
alan at ridersite dot org 9 years ago
endiku 6 years ago
sharshun dot aliaksandr at gmail dot com 5 months ago
glob(dirname($pattern).'/*', rene dot rathmann at gmx dot de 2 years ago
nuntius 6 years ago
r dot hartung at roberthartung dot de 6 years ago
heavyraptor at gmail dot com 7 years ago
parazuce [at] gmail [dot] com 8 years ago
true) wang yun 6 years ago
Per Lundberg 12 years ago
pope at q dot com 8 years ago
martinlarsen at bigfoot dot com 8 years ago
lesion at autistici dot org 9 years ago
bimal at sanjaal dot com 3 years ago
troy at troyonline dot com 5 years ago
josh at servebyte dot com 8 years ago
Anonymous 9 years ago
= sql_case("*.pdf");var_dump(glob($pattern));?> BigueNique at yahoo dot ca 5 years ago
?>
ottodenn at gmail dot com 6 years ago
sebastian dot wasser at gmail dot com 8 days ago
$dirs as $dir) { roland at rd-creation dot fr 2 months ago
Anxiety35 at gmail dot com 1 year ago
mkas at destiny dot lt 4 years ago
count($path) != 0) sven at NOSPAM dot sven dot globalunix dot org 6 years ago
preg_match('/^'.$regex.'$/is', $haystack); eric at muyser dot com 8 years ago
guilleva at gmail dot com 9 years ago
sean at syosoft dot com 8 years ago
okumurya at hotmail dot com 9 years ago
Sam Yong - hellclanner at live [dot] com 8 years ago
='/server/public_html/path/'; nataxia at gmail dot com 8 years ago
viajy at yoyo dot org 9 years ago
torch at torchsdomain dot com 9 years ago
joseph dot morphy at gmail dot com 9 years ago
sort_by_mtime($file1,$file2) { info at urbits dot com 10 years ago
management at twilightus dot net 9 years ago
glob($dir . '*') as $file) Anonymous 11 years ago
admiral [at] nuclearpixel [dot] com 10 years ago
$return){return array();} Jacob Eisenberg 10 years ago
DMan 10 years ago
x_terminat_or_3 at yahoo dot country:fr 10 years ago
pattern_match($pattern,$string) Deviant 11 years ago
getDir($sDir) { fraggy(AT)chello.nl 11 years ago
tmm at aon dot at 13 years ago
strpos($filename,".")) {
sthomas at townnews dot com 13 years ago
MichaelSoft 12 years ago
Michael T. McGrew 10 years ago
cjcommunications at gmail dot com 11 years ago
edogs [at] dogsempire.com 10 years ago
cgamedude at yahoo dot com 10 years ago
vidmantas dot norkus at neo dot lt 7 years ago
$file_tmp as $item){ ryan at wonko dot com 12 years ago
martin dot rode at zeroscale dot com 13 years ago
What does a glob show?A celestial globe shows notable stars, and may also show positions of other prominent astronomical objects. Typically, it will also divide the celestial sphere into constellations. The word globe comes from the Latin word globus, meaning "sphere".
How does glob work?A glob is a string of literal and/or wildcard characters used to match filepaths. Globbing is the act of locating files on a filesystem using one or more globs. The src() method expects a single glob string or an array of globs to determine which files your pipeline will operate on.
What is glob search?The glob() function searches for all the pathnames matching pattern according to the rules used by the libc glob() function, which is similar to the rules used by common shells.
What is glob glob?Python glob. glob() method returns a list of files or folders that matches the path specified in the pathname argument. This function takes two arguments, namely pathname, and recursive flag. pathname : Absolute (with full path and the file name) or relative (with UNIX shell-style wildcards).
|